Question: Create a new Java project. Create a class named Student with instance data as follows: student id and test 1, test 2, test 3. Create

Create a new Java project.

Create a class named Student with instance data as follows: student id and test 1, test 2, test 3.

Create a constructor with parameter values for all instance data fields.

Create getters and setters for all instance data fields.

Provide a method called CalcAverage that computes and returns the average test score.

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


Create a driver program called TestScores.

Create 2 students as follows: 

     Student AB123 is created with test scores: 100, 80, 94

     Student AB456 is created with test scores: 78, 92, 80

 

Output sample:

Student ID: AB123

Test 1 score: 100

Test 2 score: 80

Test 3 score: 94

The average test score is 91.33

Student ID: AB456

Test 1 score: 78

Test 2 score: 92

Test 3 score: 80

The average test score is 83.33

Step by Step Solution

3.41 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution Java project to calculate average test scores Student class public class Student private in... View full answer

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 Programming Questions!