Question: PLEASE WRITE THIS CODE IN JAVA PROGRAMMING LANGUAGE Your goal is to ask for the total bill and the amount that the user gave as

PLEASE WRITE THIS CODE IN JAVA PROGRAMMING LANGUAGE

PLEASE WRITE THIS CODE IN JAVA PROGRAMMING LANGUAGE Your goal is to

Your goal is to ask for the total bill and the amount that the user gave as a tip and determine based on a set of criteria whether that tip was a good amount. Prompt the user for the total bill amount. Input ? What was the total bill? OK Cancel Prompt the user for the tip that they left. input How much tip did you leave ? 3.50 OK Cancel Use the following equation to calculate the tip percentage: tip amount total bill Based on the tip percentage that was calculated, determine a message to display that will tell the user how good their tip was. Criteria: Tip less then 0 or greater than 1 Tip is between 0 (including 0) and 0.05 (including 0.05) Tip is between 0.05 (not including 0.05) and 0.1 (including 0.1) Tip is between 0.1 (not including 0.1) and 0.2 (including 0.2) Tip is between 0.2 (not including 0.2) and 0.3 (including 0.30) Tip is greater than 0.3 Display the tip percentage that the user left along with a message as to how they rank as a tipper in an output box. Message You left a 14.93% tip. You are a good tipper OK Rubric: Use an input box to prompt the user for the total bill amount and parse the result as a double. (2 points) Use an input box to prompt the user for the tip that they left and parse the result as a double. (2 points) Calculate the tip percentage. (2 points) Create conditionals to determine their rank as a tipper (12 points) Display the tip percentage that the user left along with a message as to how they rank as a tipper in an output box. (2 points)

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!