Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java! (Algorithm) Assignment 05 Total Marks: 10 points Please solve the following question individually. Show all your work. Name: ID Use Netbeans to solve

In java! (Algorithm)
image text in transcribed
Assignment 05 Total Marks: 10 points Please solve the following question individually. Show all your work. Name: ID Use Netbeans to solve the following java program. Name your application as follows: YourlD_YourName HWO5. Upload your compressed application to the blackboard under Hwos. 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 applance 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 Based on the table below you can determine each level Con n klowatt-hours (kWh Level 2000kWh or less Low Medium u Over 2000kWh to 3100kWh r 3100kWh to 4600kWh 4600kWh 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 of that appliance ance ower 2000 watts( 70 wattsW 200 watts(W) 1600 Washing Machine efri Vacuum Water Heater tor 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.ekah/day The energy consumption (per year) of Clothes Dryer is 2198.ew/year This is Mediun energy usage UTLD SUCCESSFUL (total tine: 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_2

Step: 3

blur-text-image_3

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 Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions

Question

Why can skipping payment of a preferred dividend be a bad signal?

Answered: 1 week ago

Question

Gambling by student and professional athletes

Answered: 1 week ago