As a result of the controversy at the
Winter Olympics over the judging of figure skating, a new judging system
is being used in the Comics Strip World Cup of Figure Skating. Each
skater is rated by eleven judges using a 6-point scale, with ratings given
in tenths of a point. So, a judge could rate a skater's performance
between 0.1 and 6.0. After all judges rate the skater, the two
highest and the two lowest ratings are discarded and the remaining
seven ratings are summed to get the skater's overall score.
For example, the ratings for Hilary Forth
(daughter of Sally Forth) are
4.8 5.5 5.5 5.5
5.5 4.4 5.4 4.9 5.3 4.3 5.0
The 4.3 and 4.4 are thrown out as low
scores and two 5.5s are thrown out as high scores. The other seven
scores are added to give Hilary a score of 36.4
The ratings for the skaters are held in two separate files based on the skaters sex. The files are named femaleskaters.dat and maleskaters.dat Each line in each of these files contains the skater's first name and last name and eleven judge's ratings. Each value is separated from the next by one or more spaces. Both files can be found at either P:\courses\Spring2002\COSC\COSC110\003\world-read or I:\jlwolfe\110 Copy the two data files to your own disk (to the folder you are using to develop this project).
You are to write a program that analyzes both files and displays a report showing the following information for each skater: the skater's name, overall score, and the four ratings that were thrown out. This information must displayed in neat, labeled columns. After displaying the information for each skater, the program must display the name and score of the skater with the highest overall score. This person is to be named "Best of Show" at the competition. The output for the program should begin like this (provided the femaleskaters.dat file is processed first)
Skater's Name Score Low Ratings High Ratings
Auntie Blossom 38.0 5.1
5.1 5.7 5.8
Daisy Duck 39.5 5.4 5.5
5.7 6.0
Sea Hag 34.8 4.6 4.6
5.3 5.4
Minnie Mouse 35.3 4.7 4.8
5.2 5.6
Broom Hilda 34.4 4.5 4.5
5.1 5.5
Granny Yokum 40.5 5.7 5.7
5.9 6.0
April Johnson 37.5 5.1
5.1 5.7 5.7
Hilary Forth 36.4 4.3 4.4
5.5 5.5
Note that the skaters' names are right justified in the first column and the numeric values are all aligned on the decimal point. The scoring report should list all the female skaters first and then all the male skaters (in one big table). Below the bottom of the table, the program should display the name and score for the Best of Show award.
You program is required to have at least one function in addition to the main function. The required function must handle the processing and display for one complete file. main should then invoke this function twice to process each of the data files. You may want to have additional functions in your program, for example, to process the ratings or to identify the two lowest or two highest scores or to calculate the overall score for a skater. Incidentally, if you happen to know how to use arrays, you are NOT allowed to use them for this project.
Hand in a well-commented program listing,
produced by printing from the Visual Studio environment. Also, hand
in a printout of the output for the program. Because the output is
too large to fit in the output window, you will need to execute the program
in a different way to capture the output.