Question: Make TestRectangle class having main method to test Rectangle class & do the following things: create first object of Rectangle using default constructor and display

Make TestRectangle class having main method to test Rectangle class & do the following things:
create first object of Rectangle using default constructor and display the value of length and width variables of the Rectangle class
create second object of Rectangle using constructor with values 15 and 16, and display the value of length and width variables of the Rectangle class
invoke setLength() method using first object which you have created above and change value of length variable of Rectangle class to 13.
invoke setWidth() method using first object which you have created above and change value of width variable of Rectangle class to 14.
print the value of first object using println() method
declare an array of type Rectangle class of size 10 and load it using a loop and invoking a constructor with two arguments
using a loop print the content of above array which you have loaded already
create third and fourth objects of Rectangle class and compare them using equals() method.
javadoc documentation for both classes into one index.html file

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!