Step-by-Step Computers and Technology Tutorials for Easy Learning
ODI Instructions ArrayMethodDemo.j.. 1 public class ArrayMethodDemo 2 public static void main (String args[]) Create an application containing an array that stores eight integers. The application should call five methods that in turn: int[] numbers [12, 15, 34, 67, 4, 9, 10, 7]; int limit 12; display (numbers); displayReverse(numbers); displaySum(numbers); displayLessThan(numbers, limit); displayHigherThanAverage (numbers); lal 4 1. Display all the integers 2. Display all the integers in reverse order 3. Display the sum of the integers 4. Display all values less than a limiting 9 10 11public static void display(int[ numbers) 12 13 4public static void displayReverse(intl] numbers) 15 16 7 public static void displaySum(int[] numbers) 18 19 20 public static void displayLessThan (int[] numbers, int limit) 21 argument 5. Display all values that are higher than the // Write your code here calculated average value // Write your code here Grading // Write your code here Write your Java code in the area on the right. Use the Run button to compile and run the code. Clicking the Run Checks button will run pre-configured tests against your code to calculate a grade // Write your code here 23 24 public static void displayHigherThanAverage(int[] numbers) 25 26 27 28 // Write your code here Once you are happy with your results, click the Submit button to record vour score