C++ applications.

Concepts tested by this project

• Loops
• File processing
• Previously mastered course topics

Beverage Orders

A high-end coffee shop has just hired you as their senior programmer. They have tasked you to design and implement two C++ applications allowing employees to take orders from its customers and to determine weekly sales.

Application #1: Create an application allowing employees to take orders and then tally up the total costs from its customers.

The coffee shop offers the following items on its menu:
• Coffee
• Tea
• Soda
• Juice
• Manager Special (store manager offers a drink of their choice to customers)

The application must be able to:
• Accept one or more drinks in a single order; use a sentinel value to terminate an order
• Once an order has been placed, tally up the total cost of the order

Application #2: Create another application to process an input file, weekly_sales.txt, and tally up its weekly sales total. The data file consists of 7 entries representing the sales from last week.

If the input file does not exist, prompt user to try again.


Project Requirements

• Proper formatting must be utilized. For example, currency format was be used for any order amount.
• Data validations
o When an order for coffee is placed, the application should accept ‘c’ or ‘C’. See sample run.
o When an invalid menu item is entered, the application should ignore it. ‘w’ or ‘W’ should be ignored.
• If the weekly sales data file is not available, display an appropriate error message. DON’T crash the program.
• Be sure to thoroughly test both applications – valid and invalid test cases must be included.
• Be sure to review the provided rubric so that you understand the project’s expectations in regard to documentation, CMSC140, and programming requirements.
• Not clear or need clarifications? Seek help from your instructor. “I did not know …” or “I did not understand …” is not going to cut it.

In addition to completing the applications, a write-up is required. At a minimal, the write-up should include:
• Project Design / Algorithm
o A list of detailed steps to capture the design of each application
o Students should complete this step first, and then write your code
• Test Plan/ Test Cases (be sure to include a table of your test cases. Your instructor will look for them)
o I want to see your “thinking,” as to how you are testing your program.
• Screen shots capturing some of your test runs (just like the provided sample runs)
• Any assumptions that you are making
• Highlights of your learning experience. Very important, as your instructor is interested in what you have done, how you did it, etc.
o Anything else that you want to share with the instructor


Submission Requirements

Each student must submit one compressed (zip) file (back) to the assignment’s folder on Blackboard with the following project artifacts:
• Your projects’ folders – Your instructor MUST BE able to compile and test (the actual code of) each submitted program (
o For this project, you should have worked on two separate folders for the two programs under Visual Studio
• Project Write-up (in a Word document)
• The compressed file must be named as <firstname_initial_lastname_project_x> where x is the project number and your name (i.e., gthai_project_4.zip)

Academic Integrity Policy reminder – Each submitted project will be compared against others’ submissions from current and previous semesters.


Sample Runs

Below are sample runs for the 1st applications. Yours should be similar but should not be exactly the same.



Instructor’s comment: Each order must also be saved to an output file.

Here are the sample runs for the 2nd applications. Yours should be similar but should not be exactly the same.

About to process weekly sales
There are 7 entries, and the total was $628.83

About to process weekly sales
Could not open file. Exiting program.