Question: Write a program called 'Lab8.java' which does the following: 1) Creates an int array containing the digits of today's date: 0 2 2 5 2

Write a program called 'Lab8.java' which does the following:

1) Creates an int array containing the digits of today's date: 0 2 2 5 2 0 2 1

2) Make a copy of the array

3) Print both arrays with labels. For example:

arrayA = [0, 2, 2, 5, 2, 0, 2, 1]

copyOfA = [0, 2, 2, 5, 2, 0, 2, 1]

4) sort the copy (The original should be unchanged.)

5) print both arrays again to show that only the copy was sorted. Example:

After sorting:

arrayA = [0, 2, 2, 5, 2, 0, 2, 1]

copyOfA = [0, 0, 1, 2, 2, 2, 2, 5]

6) Reverse the copy and print both arrays again. (The original should be unchanged.)

7) print the following statistics about the original array:

The size:

The minimum element:

The maximum element:

The sum of the elements:

The average of the elements: (show exactly 2 decimal places)

8) Create the 2D array shown below (which represents a Sudoku puzzle):

Write a program called 'Lab8.java' which does the following: 1) Creates an

9) Print the 2D array from question 8 shown above.

9 1 16 2 4 39 6 4 2 739 5 8 1 3 94 3 7 82 9 4 3 2 6 8 9 6 1 3 4 1. 8 9 2

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!