You must define the methods listed below in your program


Compose a program (ArrayDemo.java) that prompts the user to enter 5 integer numbers. Once the user enters the 5 numbers, the program must determine and output the average, the largest, and smallest of 5 numbers.

You must define the methods listed below in your program. Make sure to keep the keyword "static" when you define the methods (we will learn later what static means). Call these methods from the "main" to get the job done.

static float getAverage(int[] data)

{

// put your implementation here

}

static int getLargest(int[] data)

{

// put your implementation here

}

static int getSmallest(int[] data)

{

// put your implementation here

}

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: You must define the methods listed below in your program
Reference No:- TGS02757689

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)