Question: Java Program - In a comment, give a general explanation of what your program does. As the programming questions get more complex, the explanations will
Java Program
- In a comment, give a general explanation of what your program does. As the programming questions get more complex, the explanations will get lengthier.
- Include comments in your program describing the main steps in your program. Focus in your comments rather on the why than the how.
- Display a welcome message.
- Display clear prompts for users when you are expecting the user to enter data from the keyboard.
- All output should be displayed with clear messages and in an easy to read format.
- End your program with a closing message so that the user knows that the program has terminated.
Java program
In this question, you will write a program to help the customer order food online and calculate the total price. Your Java program should follow the following rules:
Prompt the user to enter the choice based on the menu and validates the information
The choice should be an integer number displayed on menu from 1 to 6.
A price to calculate the total expense of the user.
Please find the menu and price in the following table. You must use switch statement to create the menu options.
Menu .................Price without Meat............. Price with beef ............Price With pork
Hamburger...................$7.5............................$25.5................................... $17.5
Pizza.............................. $7.5......................... $25.5................................... $17.5
Noodle.......................... $7.5............................ $25.5................................... $17.5
Salad........................... $7.5........................... $25.5................................... $17.5
Sandwich....................... $7.5......................... $25.5....................................... $17.5
Exit
Your program should be able to ask users new choice if the user enters Yes for more food.
If the total price is less than $50, the customer needs to pay $5 for delivery.
Your program should ask the amount of tips that the customer would like to pay.
Display welcome/closing messages.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
