Exercise : 3.32. Instructions: Make a copy of an array

There are two parts to this exercise:

• First you will make a copy of an array.
• Then you will change your code so that as you copy, you create the Pig Latin version of each string from the original array.
• Find and open the CopyArraysAndPigLatin Java program in the exercises3 package.
• Write code to make a copy of the provided names array. We do this so that we can make changes to the copy without affecting the original array. If we call the copy array copy, then the steps you take are as follows:
• Allocate the copy array with enough space to hold each of the elements of name.

Do not use constants here: pretend that the names array could be of any length.

• Iterate over the names array to assign each element of copy from names.
• Check your results by iterating over copy and printing each element.
• Now go back and cause each element of the copy array to have the Pig Latin version of each string in the original names array.