Complete the program for a tip calculation based on user input order amount (show at the left). This program includes two methods. The main method will allow user to input the order amount, and then call another method called tipCal() to calculate the proper tip amount for this order. In the textbox below, please only provide your codes as required by the comment blocks. You don’t need to repeat the provided codes in the following image. Please add comment lines to show the section numbers. Requirements: (7 pts) Under comment block #1, write a method called tipCal() first. The tipCal() should be a value return method. It takes order amount value from the main method as the input / parameter. It displays tip options for user selection. See the comment block in the program for details. Based on the tip option the user selected, calculate and/or return the tip amount to the main method. You could use IF-ELSE or SWITCH for the selection structure. As the user selection will be integer values like 1, 2, etc., it might be easier to do SWITCH here. As the tipCal() method needs user input, you should create a Scanner object in this method. The one in the main method only has life in the main method. In the tipCal() method, your Scanner object can still be called input or any other name you are familiar with. (3 pts) In the main method, under comment block #2, write statements to Call the tipCal() method to get the tip amount. Display the output message to report the tip amount and the payment total (order amount + tip amount).
What is the magnitude of the velocity of the car at the poin…
What is the magnitude of the velocity of the car at the point where it runs out of gas?
What is the total distance the car traveled from the start u…
What is the total distance the car traveled from the start until the end where it came to a stop?
Select the correct free body diagram for this block.
Select the correct free body diagram for this block.
Acceleration is always in the direction of…
Acceleration is always in the direction of…
What is the magnitude of the Normal force acting on the book…
What is the magnitude of the Normal force acting on the book?
How high was the diving board above the surface of the water…
How high was the diving board above the surface of the water?
Which of the following groups of graphs correctly represents…
Which of the following groups of graphs correctly represents the relationships of acceleration-time, velocity-time and position-time for this car? The graphs are not drawn to scale.
What would happen if someone came late to shachris and the c…
What would happen if someone came late to shachris and the chazon has already said most of Pesukeh d’zimra?
Can one say the kaddish prayer without a minyan?
Can one say the kaddish prayer without a minyan?