Jason opened a coffee shop selling coffee, cheese cakes, and coffee beans. Coffee is sold at the shop in two sizes: small (9 oz, $1.5) and large (12 oz, $1.9). Cheese cakes cost $3 per slice. Coffee beans are sold with $0.6 per oz. Write a menu-driven program that will make the coffee shop operational.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question

Using C++:

  1. Jason opened a coffee shop selling coffee, cheese cakes, and coffee beans. Coffee is sold at the shop in two sizes: small (9 oz, $1.5) and large (12 oz, $1.9). Cheese cakes cost $3 per slice. Coffee beans are sold with $0.6 per oz. Write a menu-driven program that will make the coffee shop operational.

Your program should allow the user to do the following:

  • Choose among coffee, cakes, or beans to purchase.
  • Buy coffee in any size and in any number of cups.
  • Buy cheese cakes in any number of slices.
  • Buy coffee beans in any amount.
  • At any time show the total number of cups of each size sold, total number of slices of cakes sold, and total amount of coffee beans sold.
  • At any time show the total amount of coffee sold.
  • At any time show the total money made.

Your program should consist of at least the following functions:

  • a function to show the user how to use the program,
  • a function to sell coffee,
  • a function to sell cakes,
    •  a function to sell coffee beans,
  • a function to show the number of cups of each size of coffee, the number of slices of cheese cakes, and the amount of coffee beans sold,
  • a function to show the total amount of coffee sold, and
  • a function to show the total money made.

Your program should not use any global variables. Special values such as coffee cup sizes and cost of a coffee cup must be declared as named constants.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage