Question: **Don't forget to comment your code for clarity. You may do this above statements or beside statements, but you can keep it brief . A


- **Don't forget to comment your code for clarity. You may do this above statements or beside statements, but you can keep it brief. A simple explanation is fine.
1. Create a new class file named Restaurant.Iab.java in Grasp or Eclipse 2. Import the Scanner at the top of your program 3. Write the Class comment and author and eversion tags 4. Declare and open your class named Restaurant Tab 5. Declare and open the main method 1. Declare a constant for a tax rate percentage of 7.5% (convert to a decimal) 2. Declare a constant for a tippercentage of 18% (convert to a decimal) 3. Create a Scanner object in to read the input from the console 4. Prompt the user to enter the first name and last name of the server and use the Scanner class methods to store the response in an appropriate variable (see Sample Output). 5. Prompt the user the enter the charge for the meal and use the Scanner class methods to store the response in an appropriate variable. The input can be an integer or a decimal so make sure you use the correct data type for your variable, (sce Sample Output). 6. Using your variables and constants, create new variables that calculate the values for: 1. tax on the meal 2. original total of the meal (meal plus tax) 3. tip on the meal 4. final total of the meal (plus tip) 2. Declare a constant for a tip percentage of 18% (convert to a decimal) 3. Create a scanner object in to read the input from the console 4. Prompt the user to enter the first name and last name of the server and use the Scanner class methods to store the response in an appropriate variable (see Sample Output). 5. Prompt the user the enter the charge for the meal and use the Scanner class methods to store the response in an appropriate variable. The input can be an integer or a decimal so make sure you use the correct data type for your variable. (see Sample Output). 6. Using your variables and constants, create new variables that calculate the values for: 1. tax on the meal 2. original total of the meal (meal plus tax) 3. tip on the meal 4. final total of the meal (plus tip) 5. **Make sure you have not used any "magic numbers" - i.e. hard-coded values (like 40) in your calculations. You should be using variables and constants only. 7. Using printin, print, or printf, to output the restaurant bill information according the the Sample Output. You will need to display 2 decimal places for the $ amounts in the output. 8. Close the main method and the class. 9. **Don't forget to comment your code for clarity. You may do this above statements or beside statements, but you can keep it brief. A simple explanation is fine
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
