Question: 3 pts ) Add another constructor to this class such that it takes three parameters, a ) an int for the length of the numbers
pts Add another constructor to this class such that it takes three parameters, a an int for the length of the numbers array, b another int for the length of the boxes array, and c a String type array to initialize the listOfNames array. The constructor instantiates numbers and boxes to the given parameters as lengths and assigns the third parameter to the String array. Choose your own IDs for the parameters. The constructor calls the loadNumbers and loadBoxes methods see belowpts Define the loadNumbers method. The task of this method is to populate the numbers array with randomly selected integer numbers from the range to Decide about the return type and parameters as you see it best. The method must run a for loop to the length of the array and assign a random number one by one to the array entries. pts Define the loadBoxes method. The task of this method is to populate the boxes array with Rectangles. Decide about the return type and parameters as you see it best. The method must run a for loop to the length of the array. For every index k a Rectangle object is instantiated w
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
