Question: The language is Java m Description: Design a class named Square that extends GeometricQbject. The class contains: One double data field named sidel with default

The language is Java
m Description: Design a class named Square that extends GeometricQbject. The class contains: One double data field named sidel with default value 1.0 to denote side of the A no-arg constructor that creates a default square. A constructor that creates a square with the specified sidel. The accessor and mutator methods for data field(s). A method named getArea0 that returns the area of this square. A method named getPerimeter that returns the perimeter of this square. A method named toString0 that returns a string description for the square. For the formula to: Compute the area of a square (sidel') Compute the perimeter of a square (4 times side!) The toString0 method is implemented as follows: return "Square: sidel"+sidel Draw the UML diagram that involves the classes Square and GeometricObje Implement the class. Write a test program that creates a Square object. Use Scanner object to enter the sidel of the square. Use mutator(s) method to initialize square class reference variable(side]), color yellow and filled true. Use accessor methods and display the area, perimeter, color, and whether filled or not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
