Final Problem #3

 

A school science trip was scheduled for Cedar Point.  The idea was to check out the building structures of each of the coasters as well as guesstimate the speed and g-force of each drop and loop respectively.  The input file contains the ratings of the coasters each student rode on.  For each coaster, determine the average speed and g-force.  If none of the students rode that coaster, output “no available data” for the data.  The possible coasters included:

          Millennium Force

          Top Thrill Dragster

          Blue Streak

          Mantis

Mean Streak

Raptor

Wicked Twister

 

Each student created their own input file in the following format:

          1st record = Name (alphanumeric max length 20)

          2nd record = Number of coasters rode on (numeric max length 2)

          Followed by a record for each coaster rode on in the format:

                   Coaster name (alphanumeric max length 20)

                   Average speed (numeric max length 4 with 1 decimal point)

                   G-Force (numeric max length 2)

                  

Options teacher may choose to run the program:

1.  merged the files together (no sort)

2.  merge the files together sorted by coaster name

3.  name the coasters with a numeric value from 1 to number of coasters, then use option 1 or 2