Question: Create a new Java project using NetBeans, giving it the name L-14. In java please Read and follow the instructions below, placing the code statements

Create a new Java project using NetBeans, giving it the name L-14. In java please

Read and follow the instructions below, placing the code statements needed just after each instruction. Leave the instructions as given in the code.

Declare and create (instantiate) an integer array called List1 that holds 10 places that have the values: 1,3,4,5,2,6,8,9,2,7.

Declare and create (instantiate) integer arrays List2 and List3 that can hold 10 values.

Write a method called toDisplay which will display the contents of the List1 (on one line with spaces between each value)

Write a method called toDisplayWithIndex which will display the contents of the List1 (on separate lines with index, a space, a colon, a space and the value. ( 1 : 3 )

Call the method toDisplay for List1 in the main

Call the method toDisplayWithIndex for List1in the main

Assign the value 15 to the first and 23 to the last elements of the array List1

Display the new contents of the array List1 using your method toDisplay

Write a method called makeRandom which will fill the array with random integers from 1 to 1000.

Invoke makeRandom in the main to adjust List2 with these random values.

Display List2 using toDisplayWithIndex

Write a method called makeWithInput which will fill the array with numbers inputted by the user.

Invoke makeWithInput in the main to load List3

Display the contents of the List3 array using your method toDisplay

Write a method called makeWithIndex which will fill the array List1 with the value of the index (List[0] = 0 List[1] =1 etc )

Invoke makeWithIndex in the main to adjust List1 with these index values.

Invoke toDisplayWithIndex for List1

=======================

Write a method called calcSum that will use a for loop to find and return the sum of all elements in the array

Display the sum for all 3 arrays

Write the method calcAvg which will calculate the average of the array.

Display the average for all 3 arrays

Write a method called getSmallest that will use a loop to find and return the index of the smallest element in the array List2 and List3

Display the index of the smallest element and the value of the smallest element in List2 and List3

Write a method called shuffleArray which will shuffle the values in the array. Use your book as a reference!

Shuffle List1 then call the method toDisplayWithIndex

Write a method called bubbleSort . Use your book as a reference!

Sort List2 then call the method toDisplayWithIndex

Copy your final working output and the source code to a WORD doc.

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!