Create two classes named as stationary and beverage

Assignment Help C/C++ Programming
Reference no: EM132107265

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.

Reference no: EM132107265

Questions Cloud

Determines the number of days in the month entered : Prompts the user to enter a month and year. Determines the number of days in the month entered (2=28, 3=31, etc.)
Patient presents with classic features of metabolic syndrome : Patient presents with classic features of Metabolic Syndrome. As a health care professional, what treatment would you recommend
Write a program that reads a string from the user : Write a program that reads a string from the user containing a date in the form mm/dd/yyyy and saves it in another string in the form month day, year.
Risk of developing an eating disorder : Describe demographic and psychological factors associated with a risk of developing an eating disorder.
Create two classes named as stationary and beverage : Create two classes named as ‘Stationary' and ‘Beverage'. Think of proper attributes for each class. each attribute must have a ‘name'.
What food or group of foods would you recommend : What food or group of foods would you recommend? Why? Does the food or group of foods contain dietary components that interfere with calcium absorption?
How is this food consumed in this country : Uses of the food (RICE) in 3 different countries - answer these questions. What are indicative dishes: why is this food important in these dishes?
Calculate and display the found occurrences of the substring : Ask the user for a substring to search for. Calculate and display the found occurrences of the substring in the file.
Which nutrient deficiencies cause rickets : Which nutrient deficiencies cause Rickets? How would you elucidate which nutrient deficiency was causing rickets?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd