1 2 public class EquilateralTriangle { 3 4 private int length; 5 6 public EquilateralTriangle(int length) { 7 this.length = length; 8 } 9 10 public double getArea() { 11 return (Math.sqrt(3.0) / 4) * Math.pow(length,2); 12 } 13 14 }