Homework Assignment #2
Due by 11:59PM, Tuesday July 10th, 2001

Write a C++ program that prompts the user for a Student ID# (a 4-digit integer), the Student's Class (a 1-digit integer), the Student's Gender (a 1-digit integer), and the Student's GPA (a floating point number). The user must be able to enter data for any number of students; the user must be able to enter a Sentinel Value (for this program, use a Student ID# of 9999) to tell the program that no more data is to be entered via the keyboard.

The program must then calculate and print the average GPA for all male students, for all female students, for all freshmen, for all sophomores, for all juniors, and for all seniors.Your program must print out N/A if no average GPA can be calculated for a specific group (i.e., the number of students in that group is 0).

The prompts for the program should look like the following:
Enter Student ID# (9999 to end):
Enter Student Class (1=Freshman, 2=Sophomore, 3=Junior, 4=Senior):
Enter Student Gender (1=Male, 2=Female):
Enter Student GPA (0.00 to 4.00):

HINTS

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