Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I recommend that you read, discuss and experiment with allmaterial through Modul

ID: 3608274 • Letter: I

Question

I recommend that you read, discuss and experiment with allmaterial through Module 4A before attempting thisassignment.

Each electric appliance in your home costs money tooperate. To learn exactly how much, you can start by lookingin the manual that came with the appliance to find itspower consumption. For example,your hot water heater is probably rated at between4000 and10000 W(Watts). Let's say it is rated at5000W. That means that in one hour it willuse 5000 Watt-Hours ofenergy. Since it isn't on all time,but goes on and off automatically as needed, it might be active foronly a quarter of the time (6 hours in aday). Multiply 6 hours by 5000W to see how much energy it actually uses in oneday: 30,000 WH, orWatt-Hours.   How much did that cost youthis month? Multiply by this number by 30(the average number of days in a month) to get 900,000WH. (or if you prefer, 900 KWH inKilowatt-Hours). If your electric companycharges .00005 dollars per WH(this would appear on your bill as $ .05 perKWH or 5 cents perKilowatt-Hour), then you just multiply900,000 WH by $ .00005 perWH to yield the final result: $45for a typical month for hot water (that's a lot of hotwater!).

In this program you will ask the user for the 1) WattRating and 2) Hours Per Day ofthree different energy consuming systemsin your home. You will then compute the number ofWHs per month for each of these systems (just aswe did above) and then add all three up to see how manyWHs they consume in total. Finally, you willmultiply by your power company's price per WH, andprint out the bill for a month. In your report, show thetotal number of Watt-Hours (orKilowatt-Hours) of energy used, and the dollaramount of the bill. If the bill does not seem reasonable,then you have an error and must check your results. I willnot accept outrageous numbers for watt usages or amounts due.

Here is a sample run:

Explanation / Answer

please rate - thanks import java.util.*; public class utilities { public static void main(String args[]) {Scanner input = new Scanner(System.in); int watts1, hours1,watts2, hours2,watts3, hours3,totalwatts; double bill,dollars_per_wh=.00005 ; System.out.print("How many Watts for the Water Heater?"); watts1=input.nextInt(); System.out.print("How many hours/day do you run the WaterHeater? "); hours1=input.nextInt(); System.out.print("How many Watts for the computer equipment?"); watts2=input.nextInt(); System.out.print("How many hours/day do you run the computerequipment? "); hours2=input.nextInt(); System.out.print("How many Watts for the lights? "); watts3=input.nextInt(); System.out.print("How many hours/day do you run the lights?"); hours3=input.nextInt(); totalwatts=30*(watts1*hours1+watts2*hours2+watts3*hours3); bill=totalwatts*dollars_per_wh; System.out.println(" You have used "+totalwatts+"Watt-hours of electricity"); System.out.println("Your total bill this month is$"+bill); } } /*   sample run, with sampledata     How many Watts for the Water Heater? 3500     How many hours/day do you run the Water Heater?12     How many Watts for the computer equipment?1500     How many hours/day do you run the computerequipment? 24     How many Watts for the lights? 1200     How many hours/day do you run the lights? 16        You have used 2916000 Watt-hours ofelectricity     Your total bill this month is $145.8         ----jGRASP: operation complete.    */