Question: 1. Create a Java project named FirstName-LastName-HW7 (e.g., Seung-Lee-HW7). a. Add a new package named hw7p2 to the project. b. Right click the package and

1. Create a Java project named FirstName-LastName-HW7 (e.g., Seung-Lee-HW7).

a. Add a new package named hw7p2 to the project.

b. Right click the package and add a new class named Clone without a main method.

c. Add another class named CloneTester with a main method.

2. Write code for the Clone.java with three methods.

a. The first method copies a two-dimensional array which is square (same number of rows and columns). Use the following array:

1. Create a Java project named FirstName-LastName-HW7 (e.g., Seung-Lee-HW7). a. Add a

b. The second method copies a two-dimensional array which is rectangular (diffrent number of rows and columns). This method must work for 2D square array, too. Use the following array:

new package named hw7p2 to the project. b. Right click the package

C. The third method copies a two-dimensional array which is ragged. This method must work for both 2D square and rectangular arrays. Use the following array:

and add a new class named Clone without a main method. c.

3. Write code for the CloneTester.java.

a. Test each method.

b. Test if the second method works for a 2D square array.

c. Test if the third method works for both 2D square and rectangular arrays.

7 8 9 10 11 12 13 14 15 16 17 18 19 202122 23 24 25 26 27 28 29 30 31 32 33 34 35 36

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!