Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In JAVA please and thank you: Problem Statement: Write the class Tests. Ensure that it stores a students first name, last name, all five test

In JAVA please and thank you:

Problem Statement:

  1. Write the class Tests. Ensure that it stores a students first name, last name, all five test scores, the average of those 5 tests scores and their final letter grade. (Use an array to store all test scores.)

  1. Add constructors and methods to manipulate the data stored in an object of this class. Among other things, your class must contain accessors and mutators for the stored data (for example: return a students letter grade, and modify individual test scores), a method that calculates the average of a students 5 test scores, a method that uses their average test scores and determines their final letter grade. Lastly, include a method that returns all object data (including a students name, five test scores, average, and letter grade) as a single string.

  1. Write a program to calculate 10 students average test scores and their grades. (You will ask the user to input all students and their grades).

You may assume the following input data:

First name:

Last Name:

Test 1:

Test 2:

Test 3:

Test 4:

Test 5:

Jack

Johnson

85.00

83.00

77.00

91.00

76.00

Lisa

Aniston

80.00

90.00

95.00

93.00

48.00

Andy

Cooper

78.00

81.00

11.00

90.00

73.00

Ravi

Gupta

92.00

83.00

30.00

69.00

87.00

Bonny

Blair

23.00

45.00

96.00

38.00

59.00

Danny

Clark

60.00

85.00

45.00

39.00

67.00

Samantha

Kennedy

77.00

31.00

52.00

74.00

83.00

Robin

Bronson

93.00

94.00

89.00

77.00

97.00

Sun

Xie

79.00

85.00

28.00

93.00

82.00

Kiran

Patel

85.00

72.00

49.00

75.00

63.00

  1. Use an array of objects of the class Tests (designed in step 1) to store each students data. The program should output data as close as possible to the following form:

First name:

Last Name:

Test 1:

Test 2:

Test 3:

Test 4:

Test 5:

Average:

Letter Grade:

Jack

Johnson

85.00

83.00

77.00

91.00

76.00

82.40

B

Lisa

Aniston

80.00

90.00

95.00

93.00

48.00

81.20

B

Andy

Cooper

78.00

81.00

11.00

90.00

73.00

66.60

D

Ravi

Gupta

92.00

83.00

30.00

69.00

87.00

72.20

C

Bonny

Blair

23.00

45.00

96.00

38.00

59.00

52.20

F

Danny

Clark

60.00

85.00

45.00

39.00

67.00

59.20

F

Samantha

Kennedy

77.00

31.00

52.00

74.00

83.00

63.40

D

Robin

Bronson

93.00

94.00

89.00

77.00

97.00

90.00

A

Sun

Xie

79.00

85.00

28.00

93.00

82.00

73.40

C

Kiran

Patel

85.00

72.00

49.00

75.00

63.00

68.80

D

The Class Average = 70.94

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

Students also viewed these Databases questions