CIS 327 Lab 2

Points: 30 Due Date: Monday August 4, 2003

This project will involve arrays and classes. First, you will need a class to represent a temperature reading. The data in the class will be a single temperature as a float. All temperatures are stored as Celsius. You will need methods to get and change the temperature. However, you will need to get the value as either Celsius, Fahrenheit or Kelvin.

Then you will need an array of these temperature objects. You will get a set of values from the user and store these in the array. You should have at least three elements in the array.

For the output, you will first print some column headers like Celsius, Fahrenheit and Kelvin. THen you will print each of the objects, using the appropriate method to get the converted temperature. Don't spend too much time getting the columns to line up. The last line of the table should be the average temp in each of the three scales. This last may be the tricky part.

Celsius = 1 * Celsius.
Kelvin = Celsius - 273.15.
Fahrenheit = 9/5 Celsius + 32.

Deliverables:

You should turn in a listing of the program. Staple the cover sheet to that.

Notes

Think about how you will do this so you can ask questions.
ASK if you have any questions.