ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 10 Weeks Ago, 5 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 08 May 2017 My Price 8.00

Write a program with a void method

I need help with this program. The if else statements I understand, it is the void method must be named printTemp that I am having issues with and its placement to the main method.

Write a program with a void method. Name the program Temp.java.

 

The void method must be named printTemp. There will also be a main method that prompts the user for the fahrenheit temperature and calls the method.

 

printTemp will read in a double temperature , passed to it by the main method, and printTemp will determine solid, liquid or gas, depending on the state which water exists at this temperature (fahrenheit), and display the appropriate message. If you don't know the states of water at what temperatures, Google to learn this.

 

Here is a sample run: your output must look like this to receive full credit.

 

Please enter the temperature: 21

 

Water is a solid at 21 degrees.

 

--------------------------------------------------

 

Here is another run:

 

 

Please enter the temperature: 215

 

Water is a gas at 215 degrees.

Answers

(11)
Status NEW Posted 08 May 2017 01:05 AM My Price 8.00

-----------

Not Rated(0)