Question: Write a class named Dodecagon whose objects represent regular dodecagons (12-sided polygons). Your class should implement the Shape interface defined in this chapter. A Dodecagon

Write a class named Dodecagon whose objects represent regular dodecagons (12-sided polygons). Your class should implement the Shape interface defined in this chapter. A Dodecagon object is defined by its side length as passed to its constructor. The common formulas for the area and perimeter of a regular dodecagon are based on its circumradius, which is the radius of the smallest circle that would fully contain the dodecagon. We suggest reading about these formulas on a web site such as Wikipedia or Wolfram MathWorld.

Step by Step Solution

3.32 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

public class Dodecagon implements Shape private double sideLe... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Building Java Programs A Back to Basics Approach Questions!