Robert X.

asked • 08/04/21

Help with Java Q

2) Write a java program which asks for 10 grades from user. Place the grades in an array called grades. Calculate the maximum , minimum and average using three static methods called min, max and avg. The static methods should be in the same class as the main class and should accept the array as input argument. The methods should return the values of minimum, maximum and average. Display the data and the calculated values. Hint: use for loops in max and min functions. Assume the first value is the maximum or minimum and continue to compare and replace that value ( see similar example in the book or ppt)

1 Expert Answer

By:

Patrick B. answered • 08/04/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.