ITEC 120 | Back to Assignment index page |
Assignment 2 - TestScores class - due at midnight on Mon, Mar 8 - submit to RU05 folder |
Description: Design and implement a class which holds three integer test scores (1 to 100), and a class which tests it's use.
Your TestScores class should have:
The driver should ask the user to
enter 3 integer test scores, instantiate a TestScores object and pass that information
to the constructor. The driver should then print the TestScores (by calling
toString!), the average of the three scores (by calling the average method),
and the letter grade (by calling the letter grade method). The driver will then
ask the user if he/she would like to enter 3 more scores (repeat the process).
Points will be allocated for good class design. It is possible to get the correct output without a well designed class.
Sample output:
Program Outputs | Please enter score 1: |
User Inputs | 79 |
Program Outputs |
Please enter score 2: |
User Inputs | 79 |
Program Outputs | Please enter score 3: |
User Inputs | 80 |
Program Outputs |
Test 1: 79 Test 2: 79
Test 3: 80 |
User Inputs | yes |
Program Outputs | Please enter score 1: |
User Inputs | 90 |
Program Outputs |
Please enter score 2: |
User Inputs | 90 |
Program Outputs | Please enter score 3: |
User Inputs | 89 |
Program Outputs | Test
1: 90 Test 2: 90 Test 3: 89 The average is 89.66666666666667 The letter grade is A Do you want to enter 3 more scores? (yes or no) |
User Inputs | no |
Submit your finished java files (2 of them) to the RU05 folder in your folder on neelix.