Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Draw the UML diagram of Heptagon. - Read the description of the class below and then answer the following questions. Suppose you have to write
Draw the UML diagram of Heptagon.
- Read the description of the class below and then answer the following questions. Suppose you have to write a class named Heptagon. Assume that all seven sides of the Heptagon are of equal length. The class should contain: private data field: side (double) A public static field numOfHeptagon (int) which should count the number of heptagons created. A default constructor with no argument. A constructor that creates a Heptagon object with specified data field. Getter and setter methods for the data field. . . A method named getArea(). The area can be computed using the following formula, where 'a' is the side: Area = a cot (80) A method named getPerimeter().
Step by Step Solution
★★★★★
3.34 Rating (151 Votes )
There are 3 Steps involved in it
Step: 1
Step 1 Heptagonjava package Shapes public class Heptagon private data field side double private double side public static field numOfHeptagon int whic...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started