Question: Problem: Tip Calculator Description: 2.5 (Financial application: calculate tips) Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and

 Problem: Tip Calculator Description: 2.5 (Financial application: calculate tips) Write a

Problem: Tip Calculator Description: 2.5 (Financial application: calculate tips) Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and total. For example, if the user enters 10 for subtotal and 15 for a 15% gratuity rate, the program calculates $1.50 as the gratuity and $11.50 as the total. You must format the gratuity and total amounts using the technique shown in Canvas: Files > Week 01> NumberFormatExample.java. Finally, create only ONE Scanner object to accept input from the user. You should only ever create one Scanner object in your program when accepting input from the user. Program name: Lab01.java Sample Runs: Enter the subtotal and a gratuity rate: 1015 The gratuity is $1.50 and total is $11.50 Enter the subtotal and a gratuity rate: 10010 The gratuity is $10.00 and total is $110.00 Enter the subtotal and a gratuity rate: 15015 The gratuity is $22.50 and total is $172.50

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!