Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Jamal opened a coffee shop at WakeTech and sells coffee in three sizes: small (9oz), medium (12oz), and large (15oz). The cost of one small

Jamal opened a coffee shop at WakeTech 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 provide the following menu options:

1: Enter 1 to order coffee. 2: Enter 2 to check the total money made up to this time. 3: Enter 3 to check the number of cups of coffee of each size sold. 4: Enter 4 to print all the data. 9: Enter 9 to exit the program. Your program should consist of at least the following functions:

A function to display the user how to use the program. ( void menu() ) -- Displays menu only and does not prompt user. (2 pts) Choice 1: A function to sell the coffee.-- This function does most of the calculations (20 pts) void sellCoffee(int& sCupCount, int &mCupCount, int& lCupCount, int& totalCoffeeSold, double& tMoneyMade) sCupCount = Number of small cup size mCupCount = Number of medium cup size lCupCount = Number of large cup size totalCoffeeSold = Total number of ounces sold tMoneyMade = Total money made This function should prompt user for information Choice 2: A function to display the total money made. ( voidshowMoneyMade(double m) ) -- where m = total money made. (5 pts) Choice 3: A function to display the number of cups of each size sold. ( void showCupCount(int s, int m, int l) ) -- where: s = small, m = medium, l = large (5 pts) Choice 4: No function is required to display all the data (i.e. number of cups of each size sold and total money made) (5 pts) Program successfully runs and provides an option to Exit (Choice 9). (3 pts) Your program should not use any global variables and special values

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

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

What is the temperature of 5F in degrees Rankine?

Answered: 1 week ago

Question

Q 1 . Explain the " P vs . NP " problem.

Answered: 1 week ago

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago