CIS 636 Spring 2006  Assignment 2 – Some Basic Calculations                                                      100 points

Assigned: 01/24/2006

Due: 01/31/2006 at the start of class 

 

You may work individually or in pairs for this assignment. But all work must be the work of the person/people whose name is on the code! If working in pairs, the individual contributions should be relatively equal. One possibility is to work together tonight, then finish separately (to avoid communication difficulties).

 

Main Assignment:

We are writing a program to help America East Airline keep track of their fuel expenses. Your program will interact with the user, asking for the number of miles to be flown on a flight, the price per gallon paid for the fuel, and the number of passengers on the flight.  Your program expected time in the air (in hours and seconds), the amount of fuel used, the cost for the fuel, the cost per passenger, and the passenger miles per gallon, and will display all basic information including the calculated information.

I would like your interaction with the user to be via dialog boxes, using static methods from RedmondMsgInBasic and RedmondMsgOut in my IO package. See the sample interaction below for a textual replay of what happened in one example.

Hand in:

To avoid needless long waits, I recommend working on this on the c: drive or jump drive, then upon completion, copying it to the a: drive, testing it there, creating an extra backup for yourself.

Miscellaneous:


Textual Version of Interaction:

 

This program will analyze the fuel costs for a flight, giving the cost per passenger and passenger miles per gallon

How many miles in the flight (whole number)?

3000

What is the price of jet fuel (mpg)?

2.5

How many passengers are traveling?

300

Results

   Miles:              3000

   MPH:                600

   Hours:              5.0

   Seconds:            18000.0

   Gals/Sec:           1.0

   Fuel Used:          18000.0

   Fuel Price:         2.5

   Fuel Cost:          45000.0

   Passengers:         300

   Cost Per Passenger: 150.0

   Passenger Miles Per Gallon: 50.0