, , , , ,

[SOLVED] Cs2070 assignment 7: the restaurant bill (part 2 of n)

$25

File Name: Cs2070_assignment_7__the_restaurant_bill__part_2_of_n_.zip
File Size: 508.68 KB

5/5 - (1 vote)

The restaurant was happy with the bill tool that you wrote for them, but they need some enhancements. Everyone who shows up at the restaurant orders a entrée, a drink, and a dessert. You need to write a program which will prompt for the names of each of the three meals and their prices. You will then prompt for the name of the server. Finally, you will sum the total of the bill, compute the tax (like last time, it’s 7%) and then present the low, medium, and high tip suggestions. You are encouraged to edit your assignment 3 since there is so much overlap with this assignment and assignment 3.Name your project FirstnameLastnameAssignment7Have your program do the following.Since every numerical value in this assignment is a dollar amount, you should display all floating point numbers with a display width of 6 spaces and rounded to 2 decimal places. Also, make sure all dollar amounts begin with a dollar sign. (See the example below.) See page 167 in the textbook for an example of a number being rounded using 2 decimal places. Each of the leading strings needs to be displayed using 20 spaces and right justified. Rather than space out everything and counting spaces on the screen, use the format code to display a string using 20 spaces.Your source code must include the following documentation:Welcome to Dr. Church’s Restaurant Bill Tool. Part 2
Enter the price of the entree: 8.5
Enter the price of the drink: 1.99
Enter the price of the dessert: 3.5
Enter the name of the server: Hayao Miyazaki
Entree $  8.50
Drink $  1.99
Dessert $  3.50
Total $ 13.99
Tax $  0.98
Total w/ Tax $ 14.97
Low Tip $  2.25
Medium Tip $  2.69
High Tip $  2.99
Your server: Hayao MiyazakiTake special care to make sure that each line is formatted correctly. Even the last line with the server name uses “Your server:” displayed to 20 spaces. You should be using the System.out.printf” method for displaying everything after the initial prompts. (For the initial prompts, I used the regular “System.out.print” method.)To turn in your application, find the folder containing your entire project (not the folder with the “java” file), zip it up, and turn it in.

Shopping Cart

No products in the cart.

No products in the cart.

[SOLVED] Cs2070 assignment 7: the restaurant bill (part 2 of n)
$25