Question: For this program, use the program,**************ECLIPSE-NEON.************* Programming Assignment #1 The assignment is to create a Java program that manipulates an array. Step 1: In the

For this program, use the program,**************"ECLIPSE-NEON."************* Programming Assignment #1

The assignment is to create a Java program that manipulates an array.

Step 1:

In the main method, have the user input the size of an array. Create an integer array of that size. Then call the methods outlined in the following steps.

Step 2:

Create a method with signature: public static void initArray( int [] values ) that initializes the integer array with random values between 1 and 10.

Step 3:

Create a method with signature: public static void printArray( int [] values ) that prints the array.

Step 4:

Create a method with signature: public static void squareArray( int [] values ) that prints the array with all values squared, but does NOT change the array.

Step 5:

Create a method with signature: public static void reverseArray( int [] values ) reverses the values of the array. The values of the array should be changed...

Step 6:

Create a method with signature: public static void transposeArray( int [] values ) switches each pair of the array. The values of the array should be changed.

Note: Print the array after each step... (See sample I/O)

Sample INPUT/OUTPUT:

Enter size of array: 6 Values in array are: 1 2 3 4 5 6 Values in array when squared are: 1 4 9 16 25 36 Values in array when reversed are: 6 5 4 3 2 1 Values in array when transposed are: 5 6 3 4 1 2

Note: Someone posted this and it just made my prgram crash. Please run the program and check if it works.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!