Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

What is the function of copy in an advertising message?

Answered: 1 week ago

Question

3. What are potential solutions?

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago