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:
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:
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:
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 36Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started