Overview of the problem

You are to continue the development of software for a simple web shop. To extend the simulation we wish to now introduce the following features:

  • there will now be three types of products: weapons, clothing and survival gear.
  • In addition objects should be dynamically created and destroyed as customers login and logout.
  • The shop should operate in a continuous loop enabling customers to come and go.

Programming additions

Inheritance must be made use of in this assignment. You should modify the product class from Web_shop to be a generic product class with similar features as before. From this generic product you will derive the specific products: weapons, clothing and survival gear.

It is likely you will make use of polymorphic functions, a simple example would be to have different display functions. use of pointers and linked lists instead of arrays can be used (optional)

Product details


The weapon class should inherit the name, model and price from the product class and in addition have an attribute called purpose eg for a shotgun the purpose might be: game_shooting. The read and display functions will have to be modified to include this extra attribute (polymorphism).


The clothing class should include an additional data member for the size and another for type. For example a flak_jacket could be size Large and type is Jacket. Functions for reading and displaying will have to be modified.

Survival Gear

The survival gear class will include extra attributes of type and shelf life. For example Beef Jerky could be type Food and shelf life of 6 months.

Data files

There will be three data files: weapons.dat, clothes.dat and survival.dat. The formats of these files will be similar to the original product file but with extra data.


Name Model Price Purpose
Chainsaw CS001 59.95 Cutting
Bowie_knife BK001 39.95 Skinning

Allow for at least 10 entries in each file .

Study each file by opening in an editor such as Notepad to ensure you understand the structure so you can read it correctly.

Order class structure

Your order class structure needs to be modified from web_shop to allow for multiple product types. You need to allow for the possibility a customer will have multiple products of the types described earlier.

Operation of your program

Your program should operate in a continuous loop allowing a customer to login and logout then another customer etc. User level interaction will be the same as in web_shop, customers can choose products add them to the order, review the order, delete products then checkout and get an invoice. Customer details such as name and address and credit card number should be able to be entered as part of the checking out process.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.