Question: Create a Test class that has the following attributes a. array: Create an array of 5 rectangle objects with the following width, height: o (1.0,

 Create a Test class that has the following attributes a. array:

Create a Test class that has the following attributes a. array: Create an array of 5 rectangle objects with the following width, height: o (1.0, 2.0) o (20, 5.0) o (-3.0, 3.0) o (2.0, -4.0) o (5.0, 1.0) b. methods: Create the following methods: o a method named print that is passed an array and prints out the width and height of each rectangle element in the array o a method named up that is passed an array and increases each rectangle's height by 1 o a method named right that is passed an array and increases each rectangle's width by 1 Create a test for the methods above to show the change in the array

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!