Question: java Instructions You will be given a float variable called pricebetore Tax representing your restauraunt food bil. Compute the integer amount to pay, such that

java  java Instructions You will be given a float variable called pricebetore
Tax representing your restauraunt food bil. Compute the integer amount to pay,
such that the tip is at least 15% and the total price

Instructions You will be given a float variable called pricebetore Tax representing your restauraunt food bil. Compute the integer amount to pay, such that the tip is at least 15% and the total price paid (the price after tax plus the tip is the exact dollar amount (no change used-other than possibly loonies and toonies!). Sales tax here in Nova Scotia (called HST) is 15% Write the body of the program Details Input The program reads in one float, the food bill amount priceBeforelax Processing Compute the minimum whole dollar amount to be paid such that the tip is at least 15%, and the total price paid the price after tax plus the tip) is an even dollar amount. Output the tip that wil ultimately be paid Output Output the total price to be paid as an integer. The text must be terminated by a new-line character Hints: Math.ceil(*) returns the smallest integer double that is greater than or equal to x, It sounds up to the nearest Integer above IEG. Math.ceil(19.53) so returns 20 ) To cast a double y to an integer, remember that you can use (int)y Examples Sample Input 15% tip Price after tax Sample Output (Amount Paid) 1.00 0.15 1.15 2 10 1.50 11.50 13 100 15.00 115.00 130 import java.util.*; * The following is the only class of the program and contains all program code. The program starts running in the main of this class. public class POD { * Main method that runs when the program is started. public static void main(String[] args) { //Instantiate new scanner to read from the console. Scanner in = new Scanner System.in); //Declare & initialize variables float priceBeforeTax = in.nextFloat(); //PLEASE START YOUR WORK HERE //PLEASE END YOUR WORK HERE System.out.print("END OF OUTPUT"); } 31

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!