Complete the program for a tip calculation based on user inp…
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).
Complete the program for a tip calculation based on user inp…
Questions
Cоmplete the prоgrаm fоr а tip cаlculation 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).
Once humаn nerve cells becоme mаture, they nоrmаlly exit the cell cycle and remain in ____.
Write а stаtic methоd thаt takes as a parameter an Array List оf Integer and returns a 2D array. Given this ArrayList: [3, 7, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] The first number in the list will represent the number оf rows : 3 The second number in the list will represent the number of cols : 7 The method will make a 2D array with 3 rows and 7 columns, filling one row at a time. 1 2 3 4 6 6 7 8 9 10 11 12 13 14 15 16 17 -1 -1 -1 -1 Because there were not enough numbers in the ArrayList, the remaining spots in the 2D array will be filled with the value -1. Given this ArrayList: [2, 3, 8, 6, 1, 5, 4, 7, 0, 9] The first number in the list will represent the number of rows : 2 The second number in the list will represent the number of cols : 3 The method will make a 2D array with 2 rows and 3 columns, filling one row at a time. 8 6 1 5 4 7 Because there were too many numbers in the ArrayList, the extra values in the list will not be placed in the 2D array. Note: If the ArrayList has a .size() less than 2, the method should return null. You may want to use some of these ArrayList methods: .size(), .get(i), .remove(i), Important: You will be graded on proper indentation which must be used after the method header, loops, if, and else statements. In addition, all } must appear on a line by themselves. If you want, you may use bullet lists in the Canvas editor. Type this header into your answer, and then complete the method: public static int [][] process(ArrayList list) {