Repeat Exercise E9.13, but in the BetterRectangle constructor, invoke the superclass constructor. Data from Exercise E9.13, The
Question:
Repeat Exercise E9.13, but in the BetterRectangle constructor, invoke the superclass constructor.
Data from Exercise E9.13,
The Rectangle class of the standard Java library does not supply a method to compute the area or the perimeter of a rectangle. Provide a subclass BetterRectangle of the Rectangle class that has getPerimeter and getArea methods. Do not add any instance variables. In the constructor, call the setLocation and setSize methods of the Rectangle class. Provide a program that tests the methods that you supplied.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: