Question: In Java Please ! Design and implement a class named RegularPolygon that extends Shape. The class contains: - Data fields named sides and circumradius with
In Java Please !

Design and implement a class named RegularPolygon that extends Shape. The class contains: - Data fields named sides and circumradius with default values 0. - A no-arg constructor that creates a default RegularPolygon. - A constructor that creates a RegularPolygon with the specified sides and circumradius. - A constructor that creates a RegularPolygon with the specified sides, circumradius, as well as color and filled properties. - The accessor methods for all data fields. - Mutator methods with proper error checking. - A method named getSide() that returns the RegularPolygon side length. s=2RRin( theta /2 ). theta =2 pi/sides - A method named getArea() that returns the area of the RegularPolygon. A=R2 * sidessin( (theta) /2 - A method named getPerimeter() that returns the perimeter of the RegularPolygon. - A method named toString() that returns a string description for the RegularPolygon. This method should return something like: RegularPolygon: sides =3, circumradius =5 Make sure that when values are used to construct the RegularPolygon or if setters receive bad values that exceptions get thrown. Starter Code is provided to create an app to test your class. The code allows for Circle and Rectangle creation. The Shape, Circle, and Rectangle classes do not need to be changed. Concentrate on the RegularPolygon class development. Make the necessary modifications to the starter code to introduce RegularPolygon into it's execution. When submitting the gist, make sure all files are included in it (even the ones that you did not change). Add the global header to all the files. Here are a couple of background pages for RegularPolygons
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
