Question: J Hexagon ava > & Hexegon Jublic class Hexagon extends Geoshape ( private double sitdes c I / write your code here I / initialize
Hexagon ava & Hexegon
Jublic class Hexagon extends Geoshape
private double sitdes
c
Iwrite your code here
I initialize the color and name in the 'Geoshape' super class
set the side value, do not use assignment for this
private void sotside double length
i
II write your code here
II assign the 'side' from length
I
public double getarea
i
write your code here
II return the area of a regular hexagon all sides equal
II hint use 'Math.sqrt to get square root
here is a formula: httpsisocraticorgquestionshowdoicalculatetheareaofahexagon
public double gatereringerer
i
I write your code here
II return the perimeter of a regular hexagon all sides equal
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
