Chat with us, powered by LiveChat Write a program that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the user to enter the amou - Essayabode

Write a program that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the user to enter the amou

  

Assignment 1 

Problem Description:

Write a program that calculates the energy needed

to heat water from an initial temperature to a final temperature. Your program

should prompt the user to enter the amount of water in kilograms and the initial

and final temperatures of the water. If water weight is negative number, the following message should be displayed: “Water amount cannot be negative number!”

The formula to compute the energy is:

result = waterWeight * (finalTemperature – initialTemperature) * 4184 

Here is a sample run

Sample 1:

Enter the amount of water in kilograms: 55.5

Enter the initial temperature: 3.5

Enter the final temperature: 10.5

The energy needed is: 1625484.0

Sample 2:

Enter the amount of water in kilograms: -8

Water amount cannot be negative number!

Analysis:

(Describe the problem including input and output in your own words.)

Design:

(Describe the major steps for solving the problem.)

Coding: (Copy and Paste Source Code here. Format your code using Courier 10pts)

[Copy and Paste Your program here]

Testing: (Describe how you tested this program). Include Full Screen Shot(s)

Make Sure you Name the project as Computer programming and package Name As Assignment1.Use eclipse for the code execution.

Assignment 1

Problem Description:

Write a program that calculates the energy needed

to heat water from an initial temperature to a final temperature. Your program

should prompt the user to enter the amount of water in kilograms and the initial

and final temperatures of the water. If water weight is negative number, the following message should be displayed: “Water amount cannot be negative number!”

The formula to compute the energy is:

result = waterWeight * (finalTemperature – initialTemperature) * 4184

Here is a sample run

Sample 1:

Enter the amount of water in kilograms: 55.5

Enter the initial temperature: 3.5

Enter the final temperature: 10.5

The energy needed is: 1625484.0

Sample 2:

Enter the amount of water in kilograms: -8

Water amount cannot be negative number!

Analysis:

(Describe the problem including input and output in your own words.)

Design:

(Describe the major steps for solving the problem.)

Coding: (Copy and Paste Source Code here. Format your code using Courier 10pts)

[Copy and Paste Your program here]

Testing: (Describe how you tested this program). Include Full Screen Shot(s).

Make Sure you Name the project as Computer programming and package Name As Assignment1.

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?