Create two classes named as stationary and beverage think


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.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Create two classes named as stationary and beverage think
Reference No:- TGS02900720

Expected delivery within 24 Hours