Question: C++ Section C Design a set of classes and functions to manage an online store. The first class should represent an item that can be

C++

C++ Section C Design a set of classes and functions to manage

Section C Design a set of classes and functions to manage an online store. The first class should represent an item that can be bought in the store. An item should have a user-friendly name (i.e. "Book") represented as a std::string as well as an id which should be represented as a long value. Every item should have a price represented as a double as well as an int indicating how many are in stock The second class should represent a store, which contains a list of all the items currently available in the store. Represent this as an array of Item objects. Assume that there will never be more than 100 objects in the list. Provide a function to print out the full contents of the store with each item and the number of that item in stock: example Store: Book x 12 Colored Pencils x 15 Coloring Paper x 20 Markers x 50 Crayons x 3 Staples x 7 NOTE: Keep in mind that you are only writing the classes and functions. You can provide example code that actually creates an instance of this class and calls the function to print the result as in the above example, but I will not be checking for this or running these test functions. I am only going to look at the class and function definitions so ensure that they would behave according to the above example, given the right setup and input. The third class should represent an order. An order should consist of a list of items. Assume there are never more than 10 items in the order's list. Provide a member function that allows you to add items to the order, as well as a getter function that returns the total price of all the items in the current order. NOTE: You are free to use std::vector rather than raw arrays for this assignment, however this is not required since we have not yet learned about using std::vector

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!