Create a test driver to test the functionality of your Rectangle class created in number 14 above.
What will be an ideal response?
```
public class RectangleTest
{
public static void main(String args[])
{
Rectangle r1 = new Rectangle();
Rectangle r2 = new Rectangle(5,6);
Rectangle r3 = r2;
System.out.println(r1.toString() + "\n" + r2.toString() +
"\n" + r3.toString());
r1.setLength(8);
r1.setWidth(10);
System.out.println("The area of r1 = " + r1.getArea());
System.out.println("The perimeter of r1 = " + r1.getPerimeter());
if(r1.equals(r2))
System.out.println("r1 and r2 are equal!");
else
System.out.println("r1 and r2 are not equal!");
if(r2.equals(r3))
System.out.println("The area of r2 and r3 = " + r2.getArea());
else
System.out.println("r2 and r3 are not equal!");
}
}
```
You might also like to view...
When using the Rectangle Marquee Tool or the Elliptical Marquee Tool, you can click the ____ button to choose how the size of the marquee selection is determined.
a. Control b. Style c. Sizing d. Shape
The ____ model provides an implementation guide that helps project managers to decide if a particular activity needs to be adopted.
A. AOP B. XP C. waterfall D. CLASP
When returning an array reference, square brackets are included with the return type in the method header.
Answer the following statement true (T) or false (F)
What are the tasks performed by the for count = 0 to 3 statement?
What will be an ideal response?