Question: Write a Java program that calculates the energy needed to heat water from an initial temperature to a final temperature. The program should prompt the

Write a Java program that calculates the energy needed to heat water from an initial temperature to a final temperature. The program should prompt the user to enter the amount of water in kilograms and the initial and final temperatures of the water. The formula to compute the energy is : Q = M*(finaltemperature initialtemperature) *4184 Where M is the weight of water in kilograms, initial and final temperatures are in degrees Celsius, and energy Q is measured in Joules.

Write a Java program that calculates the energy needed to heat water

The sample run is as below: run: Enter the amount of water in kilograms: 15 Enter the initial temperature: 12 Enter the final temperature: 15 The energy needed is 188280.0 BUILD SUCCESSEUI

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!