CS 330

Spring 2008
Programming Assignment #2
Due Feb. 18

If you took CS 161/162 in C++, you must do this assignment in Java. If you took them in Java, you must do this assignment in C++.

Write a program to read in a series of exam scores (integers). Your program should output the following information: the average score (as a floating point value), the number of scores above the average, and the number of scores below the average. Finally, your program should produce a histogram (bar chart) of all the grades, based on the following criteria: 90-100, A; 80-89, B; 70-79, C; 60-69, D; below 60, F.

The input series of scores will be preceded with an integer indicating how many scores there will be.

Your program must use appropriate style, and be well structured into appropriate methods/functions.

Sample Input

14 96 88 55 82 93 48 80 75 72 79 75 90 73 70

Sample Output

14 Scores were entered.
Scores:  96  88  55  82  93  48  80  75  72  79  75  90  73  70

Average: 76.9

Number above average: 7
Number below average: 7

A: ***
B: ***
C: ******
D:
F: **

Submission

Submit your program as either histc++ or histjava, as appropriate.