Question: this program must be written in c++ and should work on a linux machine or server. That means it shouldn't contain conio.h or any header

this program must be written in c++ and should work on a linux machine or server. That means it shouldn't contain conio.h or any header files that will prevent it from not working on linux machine.

Program Description:

Create two classes named as Stationary and Beverage. Think of proper attributes for each class. each attribute must have a name. Stationary Items: Book, Notebook, Scrapbook, Pen, Marker, Erasers, etc. Beverages: Mocha, Latte, Espresso, Americano, Regular, Tea, Iced Tea, Coke, etc. You can think of any number of attributes that are related to these items. In order to keep the design simple, add all of these attributes to the stationary class. If some attributes are not applicable to a particular stationary item (e.g. erasability does not fit to Book or Notebook), then set it to some predefined value. For example, if you declare erasability as String, then set it to NA for Books and Pens. For the beverage class, you can think of basic properties as name, type (hot or cold), calories, size (tall, medium, regular, etc). All of these items from both categories should have price associated with them. Now, create a third class: Barnes_and_Nobel. This class should contain two vectors: one is stationary and the other is beverage. Add appropriate functions (at least few constructors, one destructor, set methods, and get methods). Also, each attribute should be private and the functions should be public. Each class should have its own definition file (Stationary.h, Beverage.h, Barnes_and_Nobel.h) and own class implementation file (Stationary.cpp, Beverage.cpp, Barnes_and_Nobel.cpp). In a separate file (say, program_01.cpp), write a main function that has a user-friendly menu in it. From the menu the user can insert some stationary/beverage items into the barnes_and_nobel object, print the existing items, remove some items. I am assuming you will be using the name attribute to find an item.

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!