Question
using C++ 4. You are to write a program that can be used in an Caf for displaying the menu using a function called DisplayMenu
using C++ 4. You are to write a program that can be used in an Caf for displaying the menu using a function called DisplayMenu which will display the prices of following items: (this is just a sample exercise, but you should be able to easily add more items into the menu). Regular Coffee: $1.99 Cappuccino: $3.99 Donut: $0.69 Danish: $1.29 Muffin: $0.99 From main, first call this function to display the menu, then main will ask user what they like to order and how many quantities of each item: main can store these data as item1, item2, item3, item4, item5 (the number of quantities for each item). Then main passes these numbers to another function Cost to compute the total cost of all the items customer will buy. The formula for cost will be: totalCost = item1 * 1.99 + item2 * 3.99 + so on. The function Cost should return this total cost. So, there are two functions: DisplayMenu and Cost. The Cost function has five parameters: item1, item2, item3, item4, item5, but DisplayMenu function has no parameters, and it does not return any value, simply displays the menu as shown above.
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