Question: Use Netbeans to solve the following java program. Name your application as follows: YourID_YourName_HW05. Upload your compressed application to the blackboard under HW05. Write a
Use Netbeans to solve the following java program. Name your application as follows: YourID_YourName_HW05. Upload your compressed application to the blackboard under HW05. Write a java program that calculates the energy consumption of an appliance. The program should contain three methods: a) Calculate_Energy_Consumption method: takes as parameter the appliance type and the power consumption. Prompt the user to enter the hours of use per day then calculate and return the energy consumption per day. Energy consumption is calculated using the following formula: Energy Consumption Per Day = Power Consumption * Hours of Use Per Day / 1000 b) Print_Result method: takes as parameter the appliance type and the energy consumption per day then display the energy consumption per day and the energy consumption per year of that appliance. It also prints a message indicating the level of energy usage: low, medium, high or very high. Based on the table below you can determine each level. c) Main method: that should do the following: a. Prompts the user to enter the appliance type then based on the table below determine the power consumption of that appliance. b. Call Calculate_Energy_Consumption to calculate the energy consumption. c. Call Print_Result to display the result and print the associated message. Sample Run: Energy Consumption per year in kilowatt-hours (kWh) Usage Level 2000kWh or less Low usage Over 2000kWh to 3100kWh Medium usage Over 3100kWh to 4600kWh High usage Exceeds 4600kWh Very high usage Appliance Type Power Consumption Clothes Dryer 3000 watts(W) Clothes Iron 2400 watts(W) Washing Machine 2000 watts(W) T elevision 70 watts(W) Refrigerator 200 watts(W) Vacuum Cleaner 1600 watts(W) Water Heater 4000 watts(W)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
