ASSIGNMENT 1

DOCUMENTATION: Include as a comment at the beginning of your source code:
Name, Assignment number, and Section (either MW or TTH). Include any comments within your source code to clarify things, but do not comment the obvious.

If your last name begins with a letter A-M, do the following:

Write a Java application program that will read in a centigrade temperature from the keyboard and output the corresponding fahrenheit temperature.  The program should provide a suitable prompt for input and provide a suitable description of the output.  The initial output should not be rounded, but then the rounded output (to 2 decimal places) should be displayed.  The rounding should by done by the output/formatting method, not be a math method or your own calculation.  

If you last name begins with a letter N-Z, do the following:

Write a Java application program that will read in a fahrenheit temperature from the keyboard and output the corresponding centigrade temperature.  The program should provide a suitable prompt for input and provide a suitable description of the output.  The initial output should not be rounded, but then the rounded output (to 2 decimal places) should be displayed.  The rounding should be done by the output/formatting method, not be a math method or your own calculation.

Note: To convert Centigrade to Fahrenheit, multiply by 9/5 and add 32.  To convert Fahrenheit to Centigrade, subtract 32 and then multiple the result by 5/9.  

SUBMIT: Email the .java file as an attachment to pegramitp120@gmail.com; you do not need to email the .class file.  Use your name in the subect and/or body of the email so that I know who it is from.  This email is not checked on a daily basis so only use it for submission of assignments.

Revised: September 23, 2009