Create an application containing an array that stores eight integers. The application should call five methods that in turn: Display all the integers Display all the integers in reverse order Display...


Create an application containing an array that stores eight integers. The application should call five methods that in turn:



  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 argument

  5. Display all values that are higher than the calculated average value.



Here is the given code:



public class ArrayMethodDemo {

publicstaticvoidmain (Stringargs[]) {

int[] numbers = {12,15,34,67,4,9,10,7};

int limit =12;

display(numbers);

displayReverse(numbers);

displaySum(numbers);

displayLessThan(numbers, limit);

displayHigherThanAverage(numbers);

}

publicstaticvoiddisplay(int[] numbers) {

// Write your code here

}

publicstaticvoiddisplayReverse(int[] numbers) {

// Write your code here

}

publicstaticvoiddisplaySum(int[] numbers) {

// Write your code here

}

publicstaticvoiddisplayLessThan(int[] numbers,intlimit) {

// Write your code here



}

publicstaticvoiddisplayHigherThanAverage(int[] numbers) {

// Write your code here

}

}




Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here