Homework Assignment #3
Due by 6:00PM, Wednesday, October 24th, 2001

You have been asked by a record label to write a music group evaluation program. They would like to be able to evaluate their new group, The BackN*Degrees BoysNGirls, which they think will be the next big thing. Your program will be run while the target audience is watching the BackN*Degrees BoysNGirls' newest video.

The program will be used to gather scores in 3 categories for any number of users and generate statistics based on the user input and then print out a final opinion.

Valid ratings range in value from 0 to 100 in each of three categories:

1) Overall Impression (what is the viewer's overall impression)
2) Appearance (do they look cool?)
3) Sound (do they sound good?)

When a user (viewer) enters a valid Overall Impression rating, the program then asks for
the Appearance rating followed by the Sound rating.

If the user enters enters any number outside of 0 through 100 for the Overall Impression, the program should exit the loop, print out the summary statistics, and then print the opinion.  If no viewer data was entered the program should display that fact and end (see Notes and Hints for a more specific description).

The Summary Statistics to print are:

The number of viewers
Average of the Overall Impression scores
Average of the Appearance scores
Average of the Sound scores
An average of all the above (3) averages

As for the last requirement, print out the final opinion, as follows:

If the average of averages is:

90 or above, your program should print "This band is the best!"
80-89, your program should print "Pretty good chance of being a one hit wonder."
70-79, your program should print "The jury is still out on this one, needs more work."
69 or less, your program should print "Not a chance. They stink!"

Notes and Hints:

1) You must use a sentinel controlled while loop in your program to
gather the scores.
2) You must use the "++" increment operator to keep track of how many
scores have to be collected by your program (important for
calculating the average scores)
3) If a user enters any number (other than a number between 0 and 100)
for Appearance or Sound your program should continue to
ask them for a number until they enter a valid value (i.e. between
0-100). You can use additional while loops inside your sentinel
controlled loop to enforce this number range.
4) For each viewer's data, start by printing a few (less than 80!) asterisks and on the following line "Ready for viewer #[the index number of the upcoming viewer] (all valid scores are 0 - 100):"
5) After each user's data is entered, you must print out "Thank you, viewer #[the index number of that viewer] 's data has been entered."
6) If no viewer's data was entered (i.e. user enters -1 at first input), you must print "No viewer data entered.  Ending program." and exit.

SAMPLE OUTPUT

SAMPLE RUN # 1 (Blue text is displayed by the computer,and the red represents the user's input):

Welcome to the The BackN*Degrees BoysNGirls Evaluation program!

For each viewer, please enter a score from 0 to 100 for each of
the 3 categories (Overall Impression, Appearance, and Sound) when prompted.
After entering the last test subject's scores (i.e. when finished with all user data),
enter any other number (not 0-100) for Overall Impression to end the program.

******************************************************************
Ready for Viewer #1 (all valid scores are in range 0 to 100):

Please enter your Overall Impression for The BackN*Degrees BoysNGirls
(enter any number other than 0 through 100 to end the program):

73

Please enter your Appearance score (0 - 100):

78

Please enter your Sound score (0 - 100):

90

Thank you! Viewer #1's data has been entered.
 

******************************************************************
Ready for Viewer #2 (all valid scores are in rnage 0 to 100):

Please enter your Overall Impression for The BackN*Degrees BoysNGirls
(enter any number other than 0 through 100 to end the program):

93

Please enter your Appearance score (0 - 100):

81

Please enter your Sound score (0 - 100):

80

Thank you! Viewer #2's data has been entered.

******************************************************************
Ready for Viewer #3 (all valid scores are in range 0 to 100):

Please enter your Overall Impression for The BackN*Degrees BoysNGirls
(enter any number other than 0 through 100 to end the program):

73

Please enter your Appearance score (0 - 100):

771

Sorry, 771 is not a valid entry.

Please enter your Appearance score (0 - 100):

-1

Sorry, -1 is not a valid entry.

Please enter your Appearance score (0 - 100):

77

Please enter your Sound score (0 - 100):

70

Thank you! Viewer #3's data has been entered.

******************************************************************
Ready for Viewer #4 (all valid scores are in range 0 to 100):

Please enter your Overall Impression for The BackN*Degrees BoysNGirls
(enter any number other than 0 through 100 to end the program):

-1

Summary Statistics
Number of viewers: 3
Average Overall Impression : 79
Average Appearance Score : 78
Average Sound Score : 80
--------------------------------
Average of all averages : 79

The jury is still out on this one, needs more work.
 

SAMPLE RUN # 2 (Blue text is displayed by the computer,and the red represents the user's input):

Welcome to the The BackN*Degrees BoysNGirls Evaluation program!

For each viewer, please enter a score from 0 to 100 for each of
the 3 categories (Overall Impression, Appearance, and Sound) when prompted.
After entering the last test subject's scores (i.e. when finished with all user data),
enter any other number (not 0-100) for Overall Impression to end the program.

******************************************************************
Ready for Viewer #1 (all valid scores are in range 0 to 100):

Please enter your Overall Impression for The BackN*Degrees BoysNGirls
(enter any number other than 0 through 100 to end the program):

-1

No viewer data entered. Ending program.
 
 

SAMPLE RUN # 3 (Blue text is displayed by the computer,and the red represents the user's input):

Welcome to the The BackN*Degrees BoysNGirls Evaluation program!

For each viewer, please enter a score from 0 to 100 for each of
the 3 categories (Overall Impression, Appearance, and Sound) when prompted.
After entering the last test subject's scores (i.e. when finished with all user data),
enter any other number (not 0-100) for Overall Impression to end the program.

******************************************************************
Ready for Viewer #1 (all valid scores are in range 0 to 100):

Please enter your Overall Impression for The BackN*Degrees BoysNGirls
(enter any number other than 0 through 100 to end the program):

3

Please enter your Appearance score (0 - 100):

1

Please enter your Sound score (0 - 100):

70

Thank you! Viewer #1's data has been entered.
 

******************************************************************
Ready for Viewer #2 (all valid scores are in rnage 0 to 100):

Please enter your Overall Impression for The BackN*Degrees BoysNGirls
(enter any number other than 0 through 100 to end the program):

93

Please enter your Appearance score (0 - 100):

81

Please enter your Sound score (0 - 100):

90

Thank you! Viewer #2's data has been entered.

******************************************************************
Ready for Viewer #3 (all valid scores are in range 0 to 100):

Please enter your Overall Impression for The BackN*Degrees BoysNGirls
(enter any number other than 0 through 100 to end the program):

73

Please enter your Appearance score (0 - 100):

71

Please enter your Sound score (0 - 100):

70

Thank you! Viewer #3's data has been entered.

******************************************************************
Ready for Viewer #4 (all valid scores are in range 0 to 100):

Please enter your Overall Impression for The BackN*Degrees BoysNGirls
(enter any number other than 0 through 100 to end the program):

-1

Summary Statistics
Number of viewers: 3
Average Overall Impression : 56
Average Appearance Score : 51
Average Sound Score : 76
--------------------------------
Average of all averages : 61

Not a chance. They stink!
 

Paste the source code inside an e-mail message to hm305@nyu.edu and include HW3 in the Subject Line of the e-mail message.