Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Coffee shop project part 4... Please see attached screenshots of the assignment... Thanks for your help in advance. Add functionality to calculate the total

C++ Coffee shop project part 4...

Please see attached screenshots of the assignment... Thanks for your help in advance.

Add functionality to calculate the total cost of all the coffee bills in the text file. Display the total cost after displaying the individual coffee bills. Make sure your program will correctly calculate the total cost no matter how many records are in the text file. The format should match the one in the Sample Output on page 3.

Use the Divide and Conquer approach described in Section 6.1 of your textbook to modularize your program.

Write a function that displays the menu, prompts user for a choice, validates the choice and returns a valid option.

Write a function that accepts a number of ounces and displays the number of Venti, Grande, Regular and Shot cups needed formatted as shown in the Sample Output.

Write a function that accepts a type of coffee and a number of ounces and returns the base cost (sales tax not added) of the coffee.

Write a function that only accepts a name, a type of coffee and a number of ounces and displays the coffee bill. Content and format of the bill must match the Sample Output. This function should not duplicate code found elsewhere in the program.

Make the local named constants you used in Part 1 global constants.

image text in transcribed

image text in transcribed

image text in transcribed
Project Number Project Name Project Filename Firstname Lastname Project4 (example: Jessica Smith Project4) Part 4 Coffee Shop Project Chapter 6 Use only the concepts covered in Chapters 1 6 to complete thisproect. Failure Chapter Revieto do so may result in a 0 for the assignment. Students are expected to complete the practice programs before starting the project. Points 50 Instructors and teaching assistants have been available to assist with all practice work. Students are now expected to complete this project without assistance from others (this includes receiving assistance from individuals inside or outside of CPCC). Students should consider projects as non-proctored exams, Please review the academic integrity policy on your syllabus. Assistance Please note: students can continue to receive assistance with practice work up to 5:00 p.m. on the due date (review the late period on the syllabus) Project Description For this part of the project, you will add functionality to calculate the total cost of gram into manageable all the orders in the data file and you will break up your pro pieces. Instead of having one long main function that contains all the statements necessary to solve the problem given in previous projects, you must write several small functions that each solve a specific part of the problem. These small functions should then be executed in the correct order to implement a complete solution. The named constants you used for the amount owed calculation should now be made global so you won't have to pass those values to any function. Use the Divide and Conquer approach described in Section 6.1 of your textbook to modularize your program. Think about all the different tasks your program is doing and make a list. Make sure each task doesn't include multiple unrelated tasks. If it does, break it into subtasks. Once you have your list of tasks and subtasks, you'll know what functions you'll need to write. For this project, your list MUST include the following: a function that displays the menu, prompts user for a choice, validates the choice and returns a valid optiotn. a function that accepts a number of ounces and displays the number of Venti, Grande, Regular and Shot cups needed a function that accepts a type of coffee and a number of ounces ordered and returns the base cost of the coffee a function that ONLY accepts a name, type of coffee and number of ounces and displays the coffee bill Content and format of bill should match the Sample Output . . Make sure your program uses the values returned from your functions. Any functions that need input to perform a task will have to accept parameters. Global variables are prohibited

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is CPI

Answered: 1 week ago