Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago