Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

A.

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.

B.

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

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

Step: 3

blur-text-image

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

Handbook Of Relational Database Design

Authors: Candace C. Fleming, Barbara Von Halle

1st Edition

0201114348, 978-0201114348

More Books

Students also viewed these Databases questions