Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write three Java classes called Array01Test, Array02Test, and Array03Test in one application that use arrays to perform the operation. Array01Test asks the user for the

Write three Java classes called Array01Test, Array02Test, and Array03Test in one application that use arrays to perform the operation.

Array01Test asks the user for the length of the array, has the user input integers in the array, and performs calculations (squares) and reversals on the integers in the array

Array02Test asks the user for the length of the array, has the user input integers in the array, and performs square roots (use the Math.sqrt() method) and the median. For an odd array length, the median is the one in the middle. For an even array length, it is the average of the two in the middle. If the sentinel value (999) is entered, issue a break statement to exit the For loop.

Array03Test asks the user to enter the amount of students, then last name and grade for each student, prints a listing of names and grades, the average, and the highest and lowest grade (name and grade).

Array01Test

Enter the amount of numbers in the array: 3

Enter a number: 9

Enter a number: 6

Enter a number: 8

The numbers entered are:

9 and 9 squared is 81

6 and 6 squared is 36

8 and 8 squared is 64

Average = 7.666666666666667

The numbers entered in reverse order are:

8

6

9

Next to last number entered was 6

Array02Test

Enter the amount of integers in the array: 5

Enter a number, or 999 to exit: 3

Enter a number, or 999 to exit: 1

Enter a number, or 999 to exit: 2

Enter a number, or 999 to exit: 4

Enter a number, or 999 to exit: 999

The numbers entered are:

3 and its square root is 1.732051

1 and its square root is 1.000000

2 and its square root is 1.414214

4 and its square root is 2.000000

The median is: 1.5

Array03Test

Enter the amount of students: 5

Enter a last name and grade: Smith 91

Enter a last name and grade: Jones 76

Enter a last name and grade: Harrison 78

Enter a last name and grade: Morris 99

Enter a last name and grade: Davis 98

The students and grades entered are:

Smith 91

Jones 76

Harrison 78

Morris 99

Davis 98

Average: 88.4

Highest: Morris 99

Lowest: Jones 76

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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

What are the purposes of promotion ?

Answered: 1 week ago