Wyo C++ Ch. 11 Programming Assignment

Ch11Proj1.cpp

Write a program that presents the user with the following menu:

1 Replace bowler record
2 Compute team average
3 Look up bowler average
4 Exit

Assume that two sequential access text files named strikers.txt and gutters.txt each contain data that stores the names and bowling averages for 3 bowlers. Each file contains data in this form:

John Doe<RETURN>
135<RETURN>
Jane Smith<RETURN>
187<RETURN>
Karl Malone<RETURN>
160<EOF>

When the user chooses menu option 1, he is prompted to choose for which team, the Strikers or the Gutters, he'd like to replace a bowler's record. Replacing a bowler's record includes entering a first and last name for a new bowler and a new average. The user must also be prompted for the name of a bowler which should be replaced with the new bowler's information.

When the user chooses menu option 2, he is prompted to choose for which team, he'd like to see the team average. This displayed average should be rounded to the nearest whole number without using setprecision.

When the user chooses menu option 3, he is prompted to enter a bowler's full name and team name. The program will display the bowler's average. If the inputed bowler name is not a member of the inputed team name, the program should display an appropriate messages such as "John Doe is not a member of the Strikers".

The program must use functions appropriately. However, files must be opened in the main function and passed as stream parameters. Do not open any files within a function other than main.

You must pseudocode this assignment before you write the actual C++ code. Create the two sequential access text files with dummy data using NotePad. Save those files in your C++/Ch 11 network folder. You will have to use absolute paths such as

ifstream infile("Z:/C++/Ch 11/strikers.txt");

Your program must follow the Coding Standards. Save the source code file as "Ch11Proj1.cpp" in the appropriate network folder. No test plan is necessary for this assignment.

Preconditions:

You must hand in the following on separate pages stapled in this specified order:

  1. The hardcopy source code for this assignment. Staple multiple pages together, if applicable.
  2. The typed pseudocode that you used to write out your C++ code. Please type this neatly following the specified template.