Question

in java plz8.13 LAB 3e: Calculate Energy (1) Write a program that calculates the energy needed to heat water from an initial temperature

0 0
Add a comment Improve this question Transcribed image text
Answer #1

/*
  Java Program to calculate to heat water
 */

import java.util.Scanner;

class Main
{
  public static void main(String[] args)
  {
    double M, finalTemperature, initialTemperature, Q;
    Scanner sc = new Scanner(System.in);

    System.out.println("Enter the amount of water in kilograms:");
    M = sc.nextDouble();

    System.out.println("Enter the initial temperature:");
    initialTemperature = sc.nextDouble();

    System.out.println("Enter the final temperature:");
    finalTemperature = sc.nextDouble();

    Q = M * (finalTemperature - initialTemperature) * 4184;

    System.out.println("The energy needed is: " + Q);

    sc.close();
  }
}
Add a comment
Know the answer?
Add Answer to:
in java plz 8.13 LAB 3e: Calculate Energy (1) Write a program that calculates the energy...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Energy/Specific Heat (q=mcAT) 1. Determine the energy, in Joules, needed to increase the temperature of 20.00...

    Energy/Specific Heat (q=mcAT) 1. Determine the energy, in Joules, needed to increase the temperature of 20.00 g of water from 300.0 K to 365.0 K. (Remember that one degree of Celsius contains the same amount of energy as one Kelvin.) 2. Determine the energy, in Joules, released as 1.00 kilogram of water cools from 72.0°C to 30.0°C. 3. 25.0 g of mercury are heated from 25.0° C to 155.0°C and absorbs 455 joules of heat in the process. Calculate the...

  • package _solution; /** This program demonstrates how numeric types and operators behave in Java Do Task...

    package _solution; /** This program demonstrates how numeric types and operators behave in Java Do Task #1 before adding Task#2 where indicated. */ public class NumericTypesOriginal { public static void main (String [] args) { //TASK #2 Create a Scanner object here //identifier declarations final int NUMBER = 2 ; // number of scores int score1 = 100; // first test score int score2 = 95; // second test score final int BOILING_IN_F = 212; // boiling temperature double fToC;...

  • Write Java program ( see IncomeTaxOverloadClassTemplate) calculates a tax rate and tax to pay given an...

    Write Java program ( see IncomeTaxOverloadClassTemplate) calculates a tax rate and tax to pay given an annual salary. The program uses a class,(see TaxTableToolsOverloadTemplate), which has the tax table built in. Run the program with annual salaries of 10000, 50000, 50001, 100001 and -1 (to end the program) and note the output tax rate and tax to pay. Overload the constructor. Add to the TaxTableTools class an overloaded constructor that accepts the base salary table and corresponding tax rate table...

  • For this lab you will write a Java program that plays the dice game High-Low. In...

    For this lab you will write a Java program that plays the dice game High-Low. In this game a player places a bet on whether the sum of two dice will come up High (totaling 8 or higher), Low (totaling 6 or less) or Sevens (totaling exactly 7). If the player wins, they receive a payout based on the schedule given in the table below: Choice Payout ------ ------ High 1 x Wager Low 1 x Wager Sevens 4 x...

  • Write Java program( see IncomeTaxClassTemplate) uses a class( TaxTableToolTemplate), which has a tax table built in....

    Write Java program( see IncomeTaxClassTemplate) uses a class( TaxTableToolTemplate), which has a tax table built in. The main method prompts for a salary, then uses a TaxTableTools method to get the tax rate. The program then calculates the tax to pay and displays the results to the user. Run the program with annual salaries of 10000, 50000, 50001, 100001 and -1 (to end the program) and note the output tax rate and tax to pay. a. Modify the TaxTableTools class...

  • Lab Objectives Be able to write methods Be able to call methods Be able to declare...

    Lab Objectives Be able to write methods Be able to call methods Be able to declare arrays Be able to fill an array using a loop Be able to access and process data in an array Introduction Methods are commonly used to break a problem down into small manageable pieces. A large task can be broken down into smaller tasks (methods) that contain the details of how to complete that small task. The larger problem is then solved by implementing...

  • Ethalpy Change of a Chemical Reaction, Sample calculations for Run 2 B, all questions, please hel...

    Ethalpy Change of a Chemical Reaction, Sample calculations for Run 2 B, all questions, please help me, thank you very much A chemical reaction involves breaking, making, or changing chemical bonds. These alterations in bonding lead to a change in enthalpy, AHo, between the products and reactants. This enthalpy change takes into account the change in intermal energy in the system and the work done by the system on its surroundings during the reaction. If the reaction occurs at a...

  • Can you please show how to do the calculations I sent for run 2. al values ofc where the o the maxi...

    Can you please show how to do the calculations I sent for run 2. al values ofc where the o the maximum ot minim changes? lluirate by ggh ily gven by the oquatice lcrmining the transinoal f inflection poses change abe famly to see whas shand oonal value of c at whi unges. Try to discover i a have discoveed anomials given by the oqu Er what values of c does Exp Background Information We A chemical reaction involves breaking,...

  • 10. Write a one-page summary of the attached paper? INTRODUCTION Many problems can develop in activated...

    10. Write a one-page summary of the attached paper? INTRODUCTION Many problems can develop in activated sludge operation that adversely affect effluent quality with origins in the engineering, hydraulic and microbiological components of the process. The real "heart" of the activated sludge system is the development and maintenance of a mixed microbial culture (activated sludge) that treats wastewater and which can be managed. One definition of a wastewater treatment plant operator is a "bug farmer", one who controls the aeration...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT