Question: Write a program in Java that calculates the monthly water bill for a household based on their water usage in gallons. The program should: Ask

Write a program in Java that calculates the monthly water bill for a household based on their water usage in gallons. The program should:
Ask the user to enter the number of gallons of water used in the month.
Calculate the bill based on the following rates:
For usage up to 1,000 gallons: $0.005 per gallon.
For usage above 1,000 gallons: $0.007 per gallon for the excess usage (over 1,000 gallons).
Display the total bill.
If the total bill is above $30, display the message "High Usage" in addition to the bill. Otherwise, display "Normal Usage."
Example Input/Output:
Input: Gallons used: 1200
Output: Total bill: $7.40. High Usage
Write a program in Java that calculates the

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 Programming Questions!