The George Washington University
School of Engineering and Applied Science
Department of Electrical Engineering and Computer Science
CSci 51 -- Spring 1999
Project #4
Due Date: start of class, Feb. 18, 1999

The goal of this project is to give you some experience in working with conditional (IF) statements in programs. The project depends upon material through Chapter 4 (including the new spider chapter).

In this project you will develop a case study and a program to compute a semester Grade Point Average (GPA) for each one of a set of students attending Western Watzamatta State University ("Watzamatta U" for short). The program will

  1. Prompt the user for the number of students in the group.
  2. For each one of the students, prompt the user for the number of courses that student is taking (up to 6), then read data for each of the courses, and finally calculate and display the student's GPA.

The data for each course will consist of the grade in the course, followed by the number of semester credits (up to 4) for that course. The grade will be one of the letters A, B, C, D, or F; there are no plus or minus grades at Watzamatta U.

Each course's contribution to the GPA is the number of credits for the course, multiplied by the "quality points" for that course (A receives 4.0, B receives 3.0, C receives 2.0, D receives 1.0, F receives 0.0). The overall GPA is the sum of the contributions, divided by the total number of credits.

Note: this program will involve a loop inside a loop. The outer loop will execute once per student; the inner loop will execute once per course for that student.