Conversions (Due 13 Feb 2004)

This is a simple program to get you started. You will be basically using the computer as a calculator to do a few conversions. These are some relations that you will be needing:

1 meter = 100 centimeters
1 inch = 2.54 centimeters
1 foot = 12 inches
1 pound = 453.6 grams
1 kilogram = 1000 grams
C / 5 = ( F - 32 ) / 9

Write a Java program that will perform the following calculations:

1 meter 23 centimeter is equivalent to () feet and () inches.

6 feet 2 inches is equivalent to () meters and () centimeters.

150 pounds is equivalent to () kilograms and () grams.

60 kilograms is equivalent to () pounds.

59 degree Fahrenheit is equivalent to () Celsius.

-40 degree Celsius is equivalent to () Fahrenheit.

The number of seconds in a year is ().
The output of the program will be the above lines, replacing () with the actual numbers from the computation.

The class that you will be writing will be called Convert. We will be looking at good documentation, descriptive variable names, and adherence to the coding convention mentioned below. Your file Convert.java will have the following header:

/*
  File: Convert.java

  Description:

  Student Name:

  Student UT EID:

  Course Name: CS 303E

  Unique Number: 

  TA:

  Date Created:

  Date Last Modified:

*/

You will follow the standard Java Coding Conventions. You can either view the HTML page or download the PDF or Postscript and print it out. There is a modification that I would like to make to the standard coding conventions. Please align the opening and closing braces vertically so that you can easily make out the blocks of code. For example:

if ( x > 5 ) {
  a = b + c;
}

vs.

if ( x > 5 )
{
  a = b + c;
}

Use the turnin program to submit your Convert.java file. The TAs should receive your work by 5 PM, Friday, 13 February 2004.