ITEC 120 Back to Assignment index page
   
Assignment 1 - Temperature converter
Submit your program to the RU03 folder in your folder on neelix.

Description:  Write a program which gets a farenheit temperature from the user, and converts it to celsius. Your program will sometimes print appropriate messages about the temperature. The program will continue to convert temperatures for as long as the user would like.

Using the Keyboard class, get a farenheit temperature (integer) from the user. Convert to celsius degrees -- output that answer as an integer as well. For certain temperatures, output an appropriate message:

Use your own words when composing these messages. Notice, for some temperatures, no message will be output (only the celsius conversion).

Sample run (with good numbers):

Program Outputs Welcome to the amazing temperature converter.

Please enter the Farenheit temperature you want to convert:

User Inputs 60
Program Outputs

That's 16 degrees Celsius
Good sleeping weather.

Would you like to convert another?

User Inputs Y
Program Outputs Please enter the Farenheit temperature you want to convert:
User Inputs 25
User Inputs

That's -4 degrees Celsius
Whoeee! That's cold!

Would you like to convert another?

Program Outputs y
User Inputs Please enter the Farenheit temperature you want to convert:
Program Outputs 66
That's 19 degrees Celsius

Would you like to convert another?
User Inputs n
Program Outputs

Thank you for using the great temperature converter. Goodbye!

Your program will make use of loops and if statements. Remeber to document your program! Be reminded that this programming assignment is to be your own work. You may use your textbook and class notes, tutors, and your Peer Instructor for guidance.

Hints and notes:

Please name your file program1.java.  Put the program in the RU03 folder in your folder on neelix.

Compile and run your program immediately before submitting it.  Never make a change to your code and turn it in without compiling and running it first.  It is very easy to make a last minute mistake that introduces syntax errors, so checking before submitting can save you an unnecessary grade of 0.