Question
Jason opened a coffee shop at the beach and sells coffee in three sizes: small (9oz), medium (12oz), and large (15oz). The cost of one
Jason opened a coffee shop at the beach and sells coffee in three sizes: small (9oz), medium (12oz), and large (15oz). The cost of one small cup is $1.75, one medium cup is $1.90, and one large cup is $2.00. Write a menu-driven program that will make the coffee shop operational. Your program should allow the user to do the following:
Buy coffee in any size and in any number of cups.
At any time show the total number of cups of each size sold.
At any time show the total amount of coffee sold.
At any time show the total money made.
The buy coffee option allows the customer to select the number of cups in each of the sizes they want to order and display a receipt for that order. The other three options would be used by the owner to check on the status of the shop during the day.
Design a modular program to implement this program. Pay attention to the user interface. Try to minimize the number of times the user is required to touch the keyboard.
Turn in: structure chart, source code and output showing test results (screen shot or picture)
Checklist:
Structure chart included.
File name included as comment at top of source file
IPO chart included as comments following the file name
Variable names are meaningful
IPO charts for functions incorporated as comments before each function
Program compiles
Program prompts for input and validates as needed.
Program output is formatted neatly
Program produces correct results
Program is thoroughly tested with test output included
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started