Question: USING JAVA ! A. Create a new project named StudentScores Create a Student class with instance data as follows:student id and the scores for three

USING JAVA !

A. Create a new project named StudentScores

Create a Student class with instance data as follows:student id and the scores for three tests.

Provide 2 constructors as follows:

1) parameter values for all instance data fields

2) parameter for only the student id

Provide a method called setTestScore that accepts two parameters: the test number (1 through 3) and the score. You will need to use 'if' statements to set the score to the proper test.

Also provide a method getTestScore that accepts the test number and returns the appropriate score. You will need to use 'if' statements to get the proper test score.

Provide a method called average that computes and returns the average test score for this student

Create a DisplyInfo method to show student ID, test scores, and average test score.

B. Create a driver program called TestScores.

Create 2 students as follows: ID FC123

ID FC789

Student FC123 is created with the follow three test scores: 100, 80, 94 Student FC456 is created only with the id. Later, call setTestScore with three scores 78, 92, 80

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!