So the problem I have to do is create a fast food-ordering program that calculates the cost including taxes (7.5%). Using a while or do-while loop and switch statement and don't get those very well yet. Below is more of what the menu for ordering should look something like and should repeat showing itself until the order is finished: Model Hall Fast-Food 1)  Add one hamburger ($4.99) 2)  Add one order of fries ($2.49) 3)  Add one drink ($.99) 4)  Done with Order -------------------------------------------- Your order total including tax = $ _________ Please enter an option from the menu:  The order total is given every time. When option 4 is selected, the program thanks the user and exits. Any help with coding it in C++ would be very much appreciated.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

So the problem I have to do is create a fast food-ordering program that calculates the cost including taxes (7.5%). Using a while or do-while loop and switch statement and don't get those very well yet. Below is more of what the menu for ordering should look something like and should repeat showing itself until the order is finished:

Model Hall Fast-Food

1)  Add one hamburger ($4.99)

2)  Add one order of fries ($2.49)

3)  Add one drink ($.99)

4)  Done with Order

--------------------------------------------

Your order total including tax = $ _________

Please enter an option from the menu: 

The order total is given every time.

When option 4 is selected, the program thanks the user and exits.

Any help with coding it in C++ would be very much appreciated.

Expert Solution
Algorithm:

Step-1: Start
Step-2: Declare an int variable choice
Step-3: Declare an bool variable point with initial value 'true'
Step-4: Declare a float variable totalCost with initial value 0.0
Step-5: Start a do-while loop until point != false
 Step-5.1: Print 
   Model Hall Fast-Food
   1)  Add one hamburger ($4.99)
   2)  Add one order of fries ($2.49)
   3)  Add one drink ($.99)
   4)  Done with Order
   -------------------------------------------- 
   Your order total including tax = $ _________
   Please enter an option from the menu: 
 Step-5.2: Take input from user and store in choice
 Step-5.3: switch statement(choice)
  Step-5.3.1: case 1: calculate totalCost and break
  Step-5.3.2: case 2: calculate totalCost and break
  Step-5.3.3: case 3: calculate totalCost and break
  Step-5.3.4: case 4: Print Thanks for order and set point = false
  Step-5.3.5: default: Print Wrong Choice
 Step-5.4: end switch
Step-6: end do-while
Step-7: Stop

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY