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
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.
Step by Step Solution
3.29 Rating (161 Votes )
There are 3 Steps involved in it
import javaawt class BetterRectangle extends Rectangle public BetterRectanglePoint p int ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
2106_60f58f350e761_873123.pdf
180 KBs PDF File
2106_60f58f350e761_873123.docx
120 KBs Word File
