Question: Create two classes: First is the student grader class and second is the test student grader; Create the student grader class that has the following

Create two classes:

First is the student grader class and second is the test student grader;

Create the student grader class that has the following attributes:

String studentName;

String studentNumber;

String[] studentNames

String[] studentNumbers;

String[] testNames;

Int[] testGrades;

Int currenttestPointer;

Int maxTestCount;

Int averageGrade;

Methods required:

Constructor that requires student name and number, passes the student name and number to the instance variables: creates all the arrays using maxTestCount as the size: sets the currentTestPointer to zero and averageGrade to zero;

addTest() method that requires the test name and the grade: it puts the values into the proper arrays and increments currentTestPointer;

printGrades() method that prints the test name and the corresponding grade for all tests in the arrays.

printAverageGrade() calculates the averageGrade by summing the total of all grades in the testGrades[] array and prints the grade.

Create gets and sets methods:

getStudentName() and setstudentName()

getStudentNumber() and setStudentNumber()

Create a test class that

Asks the user for the student name and number;

Creates an instance of the student grade class, passing in the name and number;

Create a loop that asks the user for a grade or -1 if there is no input. Ask the user for the test name;

Call the addTest method passing the grade and test name.

When all grades are entered: Call the printGrades method, then call the printAverageGrade() method.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!