Ask Question, Ask an Expert


Ask C/C++ Expert

Home >> C/C++

Assignment Definition:

This assignment requires the development of C++ software that supports the activities of an imaginary on-line food service (i.e., software that simulates the selection and payment of food items over computer networks). Your on-line food service should be able to process the following basic actions.

• Addition of food items (by name and quantity) to a customer shopping cart.
• Removal of food items (by name and quantity) from a customer shopping cart.
• Report of items in customer shopping cart. (Created on demand and after checkout.)
• Payment for items in a customer shopping cart (i.e., customer checkout) with a credit card number.
• Addition of food item quantity to the inventory of the food service (i.e., re-stocking)
• Summary report of all previous food purchases. (Created on demand.)

Assumptions and Minimum Data Requirements:

1383_data requirements.jpg

Implementation Requirements:
You must use the following features or structures of the C++ programming language.

• Five (5) or more programmer-defined classes including at least one (1) instance of inheritance.
• At least one (1) use of polymorphism and at least one (1) use of composition.
• Initialization of class data must be performed in class constructors.
• Pointer data types, the C++ String class, and at least one instance of operator overloading.
• At least one use of a template from the standard template library.
• Exception handling must be implemented to validate user inputs.
• Customer, cart, and inventory data must be saved on disk and retrieved each time your program runs.
• Customer, re-stocking lists and “initial” inventory data should be pre-loaded into text files.
• All user input and output should be implemented with a simple text-based console window.

Data Definitions:

You must decide the best organization and classification (i.e., class definitions) of the following items to support your application processing. Other data definitions and structures may be added as necessary. These definitions are only suggestions – not mandatory requirements.

Customer: name or ID, credit card number, current shopping cart number
Food Item: food item name and current price
Cart: cart number, list of food item names with associated quantity and prices
Inventory: list of food items on hand with associated quantity
Credit Card: card number and remaining balance


Shopping Cart

Customers may request to see the contents of their shopping cart at any time. Upon request, you must display the following information (in any programmer-defined format). Also print this same report at checkout.

Customer name, cart number, and appropriate heading for cart report or checkout.

Itemized list of food items in the cart with:

• food item name;
• food item quantity;
• food item cost (i.e., per item cost); and
• total cost of all selections for this customer.

Summary of Food Purchases:

This is a report which summarizes all previous food purchases. Each time the report is requested, the following output should be produced:

• food items names;
• total quantity sold for each food item;
• total sales for each food item; and
• total of all sales for all food items.

Test Data and Error Messages:

Create your own test data for this assignment. Print an appropriate error message whenever requested quantity exceed supply (e.g., when customers ask for more food than current amount in inventory or when total cost of food at checkout exceeds balance on credit card). See following samples.

“Sorry. Not enough  s  for your selection. Request ignored.”
“Sorry. Checkout cancelled due to insufficient funds on credit card. Cart emptied and returned to store.”


You must insert numerous comments throughout the source code listings.

Required Items to be Submitted for Stages of Development:

Stage 1: Pictures of user screens (input prompts and sample outputs). UML class diagrams including inheritance.
Stage 2: Description of data files and illustration showing which class methods access each file.
Stage 3: Final tested version of program with documentation.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M91816

Have any Question? 

Related Questions in C/C++

Only one programwrite a c program to find fibonacci numbers

Only one program Write a C++ Program to Find Fibonacci Numbers using Dynamic Programming.

C program assignmentaccording to C Program Assignment According to

C Program Assignment According to, the great circle distance based on two coordinates in nautical miles is given by: d = r * Δσ where r is the radius of the earth and Δσ ...

A write an array implementation of self-adjusting lists in

a. Write an array implementation of self-adjusting lists. In a self-adjusting list, all insertions are performed at the front. A self-adjusting list adds a find operation, and when an element is accessed by a find, it is ...

This program involves using stl listsfor this program you

This program involves using STL lists. For this program you will implement three functions whose prototypes are given below: list ::iterator mxIter(list ::iterator first, list ::iterator last); void selectSort(list & aLi ...


Program Write a C++ program that will: Ask the user for the name of an input file. Read in this name and open that text file for input. Ask the user which of two options they want to do: Read in student data Count lines ...

Descriptionnbspin this assignment you will write a c

Description:  In this assignment you will write a C++ program that finds the kth largest number among a set of N numbers. It will implement the solution using two different algorithms and measure the time elapsed during ...

You need to program a microprocessor that would have a

You need to program a microprocessor that would have a temperature, gas, humidity and PIR sensor connected to it. It would send the data to a PC via a Zigbee and receive commands from the PC via the Zigbee to control mot ...

Object oriented programmingassignmentq1 assuming there are

Object Oriented Programming Assignment Q1: Assuming there are 7.481 gallons in a cubic foot, write a program that asks the user to enter a number of gallons, and then displays the equivalent in cubic feet. Q2: You can co ...

Discussion questionsplease respond to all of the following

Discussion Questions Please respond to all of the following prompts: • What is a friend function and how is it declared? • Which operators cannot be overloaded and why? • What is a macro in C++ programming and what are s ...

For this program you will add and test 2 new member

For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, intpos) Assuming that the positions of elements of a list beg ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate