Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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):

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

Which of Porters generic strategies best fits Spanx?

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago