Introduction to Computer Science II by James Tam Return to the course web page

CPSC 233: Assignment 1(Worth 3%)

 

Writing a grade tabulator for CPSC 233

For this assignment you are to write a program that will determine a final course grade.  It will do this by prompting the user to enter in the grade points for the different course components.  Based upon these individual grade points, the program tabulate an overall grade point for the term which is the sum of the weighted GPA's for each of the course components.  Then the program will ask the user if he or she wishes to calculate another term grade.

Calculating the weighted grade points for the assignments:

  1. Assignment 1: To determine weighted GPA, multiply assignment GPA by 0.03

  2. Assignment 2: To determine weighted GPA, multiply assignment GPA by 0.03

  3. Assignment 3: To determine weighted GPA, multiply assignment GPA by 0.06

  4. Assignment 4: To determine weighted GPA, multiply assignment GPA by 0.10

  5. Assignment 5: To determine weighted GPA, multiply assignment GPA by 0.08

Calculating the weighted grade points for the exams:

  1. Midterm exam: To determine weighted GPA, multiply midterm GPA by 0.3

  2. Final exam: To determine weighted GPA, multiply final GPA by 0.4

Example:

Course component GPA   Weight   Weighted GPA
Assignment 1 4 *  0.03 = 0.12
Assignment 2 4 *  0.03 = 0.12
Assignment 3 3.3 *  0.06 = 0.198
Assignment 4 2.3 *  0.10 = 0.23
Assignment 5 2.7 *  0.08 = 0.216
Midterm 3 *  0.3 = 0.9
Final 2 *  0.4 = 0.8
Overall Term GPA =2.58

Finally the program will determine the appropriate letter grade which is based on the following ranges.

Overall GPA Final letter
Greater than or equal to 4.15  A+
Greater than or equal to 3.85  A
Greater than or equal to 3.5  A-
Greater than or equal to 3.15  B+
Greater than or equal to 2.85  B
Greater than or equal to 2.5  B-
Greater than or equal to 2.15  C+
Greater than or equal to 1.85  C
Greater than or equal to 1.5  C-
Greater than or equal to 1.15  D+
Greater than or equal to 0.5  D
Less than 0.5  F

 

Grading

Assignments will receive a grade of "A" if it fulfills all of the above requirements.  Your solution does not have to perform extensive error checking to get full credit (e.g., at this point it's acceptable if your program crashes if the person enters a character instead of a real number).   

 

Other submission requirements

1. Good coding style and documentation:  They will play a role in determining your final grade for this assignment.  Your grade can be reduced by a letter step e.g., "A" to "A-" for poor programming style.

 

Sample Executable

You can out the sample byte code program called "GradeTabulator.class" which can be found in Unix in the directory: /home/233/assignments/assignment1+2

 

New Concepts to be applied for the assignment

  1. Writing, compiling and running simple Java program
  2. Input and output
  3. Formulas
  4. Decision making
  5. Loops