Project Information
You do not know the number of records in the input file, so you must check for end of file!
The input file is grouped by movie rating but in no particular order.
INPUT FILE RECORD LAYOUT:
§ Movie title – alphanumeric length 18
§ Production company – alphanumeric length 12
§ Movie Rating – alphanumeric length 5 (G, PG, PG-13, R, NR)
§ Date Released – mmddyyyy format
§ At the Box Office Week 1 rating – integer max length 2
§ At the Box Office Week 2 rating – integer max length 2
§ At the Box Office Week 3 rating – integer max length 2
§ At the Box Office Week 4 rating – integer max length 2
§ Gross Earnings – dollar amount max value less than 1 billion
Input Records:
The Black StallionMiramax G
010120040106111200042501000
Finding Nemo Pixar G
070120030407101500025000000
Cheaper by the 12 Miramax PG
120120030406121600020000000
Peter Pan Disney PG
122020030409102000015000000
The Haunted Man Warner Bros PG 010120040307091700010000000
Scary Movie 3 Miramax
PG-13080120030204081000050000000
Matrix RevolutionsMiramax R
111520030102030401452000000
OUTPUT report should look similar to the following; be sure to indent as shown; the movie rating order is designated by the input file order:
Line#1 = page heading, centered;
Line#2 = blank
Line#3-5 = column headers for each of the input data; each column header underlined individually and spaced neatly
Line#6, etc! = repeat input data under each column header for every record
For date, you must output the data in the following format: mm/dd/yyyy
For the cost, edit the output using a floating $ sign
Line #A = after each type of rating, output the following
§ Average rating for all movies in this rating category for all 4 weeks
§ Total number of movies in this rating category
§ Total Gross earnings for all movies in this category
Line #B = after all ratings are output with their totals, output the following:
§ Total number of movies
§ The rating category with the highest average rating
Last line = write “END OF REPORT” with a blank line above it