Question: private double side; public Hexagon ( String pColor, String pName, double pSide ) { / / write your code here / / initialize the color
private double side;
public HexagonString pColor, String pName, double pSide
write your code here
initialize the color and name in the 'GeoShape' super class
set the side value, do not use assignment for this
private void setSide double length
write your code here
assign the 'side' from length
public double getArea
write your code here
return the area of a regular hexagon all sides equal
hint use 'Math.sqrt to get square root
public double getPerimeter
write your code here
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
