Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can anyone please help me solve this question without using methods of format like ( float ) ? Please make sure the question is solved

image text in transcribed

Can anyone please help me solve this question without using methods of format like ( float ) ?

Please make sure the question is solved using Netbeans java code

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 Energy Consumption per year in kilowatt-hours (kWh 2000kWh or less Over 2000kWh to 3100kWh Over 3100kWh to 4600kWh Exceeds 4600kWh Usage Level Low usage Medium usage High usage Very high usage c) Main method: that should do the following Prompts the user to enter the appliance type then based on the table below determine the power consumption of that appliance a. Appliance Type Clothes Dryer Clothes Iron Washing Machine Television Refrigerator Vacuum Cleaner Water Heater Power Consumption 3000 watts 2400 watts 2000 watts 70 watts 200 watts 1600 watts 4000 watts 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 Enter the appliance type: Clothes Dryer Enetr the hours of use per day: 2 The energy consumption (per day) of Clothes Dryer is 6.0kWh/day The energy consumption (per year) of Clothes Dryer is 2190.0kwh/year This is Medium energy usage BUILD SUCCESSFUL (total time: 11 seconds)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

2. To compare the costs of alternative training programs.

Answered: 1 week ago

Question

1. The evaluation results can be used to change the program.

Answered: 1 week ago