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++

Write a c application that does the followingitem 1 prompts

Write a C++ application that does the following: ITEM 1: Prompts the user to choose one of the following series: 1 + 1/2 + 1/3 + ... + 1/n ((((x * 2) * 2) * ...) * 2) series of n multiplications x + (x * 1) + (x * 2) + ( ...

Computer scienceyou have gathered your information on the

Computer Science You have gathered your information on the AI for the Tic-Tac-Toe game and began to develop your own ways to improve it using C++. Now, it's time to present your findings in a final paper. Remember that y ...

Assignmentbullwrite the code for each lab

Assignment • Write the code for each lab assignment. • Submit the lab in a single zip file in the online course shell. The lab must contain all .cpp files, along with any additional files that may be necessary for your p ...

1 write a c program that allows the user to create a test

1. Write a C++ program that allows the user to create a test bank of questions 2. The program should first ask the user how many questions he or she wishes to create. 3- The user should now be prompted for all informatio ...

Assignmentoverviewthis assignment consists of implementing

Assignment Overview This assignment consists of implementing an application using the techniques learned in the first half of the course. Examples on how to use file operations, random number generation, the standard tem ...

Programming assignmentwrite a c program that allows the

PROGRAMMING ASSIGNMENT Write a C program that allows the user to make some banking transactions. The program should first prompt the user to enter the current balance of his/her bank account (in dollars and cents). The p ...

Cs 2410workshop make-up assignmentwrite a c program that

CS 2410 Workshop Make-Up Assignment Write a C++ program that will output to a file called output.txt EVERY 10 digit phone number from 713-000-0000 through 713-000-0998. These numbers MUST only contain an odd number of ev ...

Assignmentpart acomplete the following questionswrite c

Assignment Part A Complete the following questions: Write C++ code to open a document with the name Hello.txt, place the message "Hello, World!" in the document, and exit the document. Re open the file you closed, and re ...

Assignmentobjectivespractice reading characters from a

Assignment Objectives Practice reading characters from a file Practice using command line input Practice using command-line redirection of files Practice implementing a double transposition ciphering algorithm Summary In ...

Assignment a random mazewrite a new c program with the

Assignment (a) Random Maze Write a new C++ program with the following functionality: The program writes a greeting on the screen. Then the program displays a maze of ASCII symbols on the screen. The maze consists of 8 ro ...

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro