Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment you will be writing multiple methods that work with arrays. These methods will perform specific functions and, in most cases, return results.

In this assignment you will be writing multiple methods that work with arrays. These methods will perform specific functions and, in most cases, return results. Your class should be named Grades.
Your program will have the following methods:
public static int readGrades()
public static int sum(int[] arr)
public static int sum(int[] arr, int firstIndex, int lastIndex)
public static double average(int[] arr)
public static int maxValue(int[] arr)
public static int maxValue(int[] arr, int firstIndex, int lastIndex)
public static int indexOfFirstMaxValue(int[] arr)
public static int minValue(int[] arr)
public static int minValue(int[] arr, int firstIndex, int lastIndex)
public static int indexOfFirstMinValue(int[] arr)
public static int numberOfBelowAverageElements(int[] arr)
public static int numberOfAboveAverageElements(int[] arr)
public static void rotateElements(int[] arr)
public static void rotateElements(int[] arr, int rotationCount)
public static void reverseArray(int[] arr)
public static void main(String[] args) For example, if the input is:
2575-1
5102030405060708090100-1
19151433764688786979757372-1
-1
The output will be:
Enter a grade :
Enter a grade :
Enter a grade :
Number Of Grades =2
Maximum Exam Grade =75
Minimum Exam Grade =25
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Number Of Grades =11
Maximum Exam Grade =100
Minimum Exam Grade =5
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Enter a grade :
Number Of Grades =13
Maximum Exam Grade =88
Minimum Exam Grade =14
Enter a grade :

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

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions