Question: use java language. need to calculate both table alsi together Water usage charge is calculated based on water tariff table. Tables 1 and 2 show
use java language. need to calculate both table alsi together
Water usage charge is calculated based on water tariff table. Tables 1 and 2 show the water tariff charges for non-commercial and commercial users. Table 1: Water Tariff for Non-Commercial Consumers Water Usage (in meter) Rate 0 - 15 RM 0.40 16 -40 RM 0.70 41 - 60 RM 1.00 > 60 RM 1.30 Table 2: Water Tariff for Commercial Consumers Water Usage (in meter) Rate 0 - 20 RM 0.70 21 - 50 RM 1.10 > 50 RM 1.50 Water usage charge is calculated based on the first water usage level. For example, if the water usage in commercial category is 30 meter, it has fallen in RM1.10 per meter However, the calculation will consider the first 20 meter, which is RM0.70 per meter and the balance of 10 meters will be calculated at RM1.10 per meter. Thus, the water usage charge for 30 meter is ((20x0.70)+(10x1.10))=RM25.00. If the water usage is 60 meter, then the first 20 meter is calculated as 20x0.70=RM14.00, the second 30 meter is calculated as 30x1.10=RM33.00, and the remaining balance of 10 meter is calculated as 10x1.50=RM15.00. Thus, the aggregate water usage billed is 14+33+15=RM62.00. For another example, if the water usage in non-commercial category is 60 meter, it has fallen in RM1.00 per meter. However, the calculation will consider the first 15 meter, which is RM0.40 per meter", the second 25 meter is RM0.70 per meter, and the balance of 10 meter will be calculated at RM0.90 per meter. Thus, the water usage charge for 50 meter is ((15x0.40)+(25x0.70)+(20x1.00))=RM43.50. .1.00 In implementing this assignment, you should request two inputs from user; a) user category and b) volume of water usage. uses had to pay
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
