SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 313 Weeks Ago, 6 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 06 Jan 2018 My Price 10.00

menu-driven C++ program for food purchases

Hello! I need some help with assignment i cant seem to get it right. Thank you !

CIS 1111 Programming Topic 10 – Restaurant Functions

(20 Points)

 

Description:

Write a menu-driven C++ program for food purchases at the baseball stadium’s restaurant. The main program will loop allowing the user to select food items from the menu adding each item to the bill, terminating when the user selects the “End order” item. The program will then calculate and display the total bill with tax (.065) and tip (.20); tip is calculated on the pretax bill.The program also needs to collect payment and calculate change due.

The program needs to validate that the user has entered a valid menu selection and that the amount tendered is enough to cover the bill.

HINT: Use the menu-driven program on pages 318-319 of our textbook as a model.

Requirements:

1.       Functions :

a.       Define a void function without parameters to display the food menu and prices

b.      Define a void function with 4 parameters (bill, totBill, tax, tip) to display the bill

c.       Define a void function with 2 parameters (totBill, amtTendered) to calculate and display the change due

2.       Global variables may not be used. All variables used in functions must be passed by parameters or declared locally.

3.       Program must be menu-driven

4.       Input validation for menu item choice and amount tendered.

5.       Verify that the customer tendered an amount that is equal to or greater than the total bill.

6.       Output must be labelled and easy to read as shown in the sample output below. Only display 2 decimal points when displaying Total Amount Due and Change Due.

7.       Program must be documented with the following:

a.       // Name

b.      // Date

c.       // Program Name

d.      // Description

 

See the sample output on the following page.

 

 

 

 

 

 

 

 

 

 

Sample Output:

 

Baseball Game Snack Menu

1 – Hamburger                  $6.00

2 – Hotdog                          $4.50

3 – Peanuts                        $3.75

4 – Popcorn                        $5.50

5 – Soda                               $2.80

6 – Chips                              $1.00

7 – Water                            $2.00

8 – End order

 

Enter menu item: 2

Enter menu item: 5

Enter menu item: 6

Enter menu item: 9

Incorrect menu selection, please reenter: 8

 

Bill = $8.30

Tax = .54

Tip =  $1.66

Total amount due: $10.50

Amount tendered: $10.00

Amount paid is not enough to cover bill, please enter new amount: $15.00

Change due: $4.50

 

 

Submit:

Zipped folder named LastNameFirstNameCIS1111NameOfAssignment which contains:

1.       Your .cpp file

2.       Screen shots of your code and output

 

Grading Guidelines for This Assignment

 

Range – Low End

(Did not do or did very little effort)

Range – High End

(Used correctly and spent time/effort on programming)

Names of variables are meaningful and the program comments self-document the program

0

2

Met all stated requirements

0

10

Output is correct given the input, and the output is correctly formatted

0

4

Program compiles and executes without any runtime, syntax, or logic errors

0

3

The zipped project folder that includes the C++ .cpp source files and screens shots of the code and console is uploaded to drop box.

0

1

Total Points Possible

0

20

 

Answers

(5)
Status NEW Posted 06 Jan 2018 06:01 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)