This my problem>>>>if any one can solve it>>>
Write a java program that calculates and prints out bills of the city water company. The water rates vary, depending on whether the bill is for home use, commercial use, or industrial use. A code of 1 means home use, a code of 2 means commercial use, and a code of 3 means industrial use. Any other code should be treated as an error. The water rates are computed as follows:
• Code 1: Dh 5.00 plus Dh 0.005 per gallon use
• Code 2: Dh 1000.00 for the first 4 million gallons used and Dh 0.0025 for each additional gallon
• Code 3: Dh 1000.00 if usage doesn’t exceed 4 million gallons; Dh 2000.00 if usage is more than 4 million gallons but doesn’t exceed 10 million gallons; and Dh 3000.00 if usage exceeds 10 million gallons.
Your program should prompt the user to enter the number of customers (type int), an account number (type int), the code (type int), and the gallons of water used (type double). Your program should print the input data and print the amount due for each customer. Also your program should find and print the total income of the company and the average bill amount of each type of customer.