This lab has three sections In Section 1 write a class called Rectangle that represents a Rectangle object.

mathematics

Description

This lab has three sections. In Section 1, write a class called Rectangle that represents a Rectangle object. Rectangle objects will have length and width attributes, and they will have perimeter () and area () methods. The Rectangle class should also have get methods for all attributes and set methods for all attributes. The Rectangle class should also have a get Type () method that returns or outputs "Rectangle." In Section 2, write a class called Square that is a child class of Rectangle. A square is a rectangle with equal sides. It should inherit the perimeter () and area () methods. It should also inherit the get and set methods for each attribute, if that is appropriate. The Square class should override the get Type () method from the super class so that it returns or outputs "Square." In Section 3, write a class called Test Driver that demonstrates all of the code in your Rectangle class and in your Square class. Three files: Rectangle.java, Square.java, Test Driver.java. And screen shots in MS Word file.


Related Questions in mathematics category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.