Class Geometry.AreaAndPerimeter

  • Enclosing class:
    Geometry

    public static class Geometry.AreaAndPerimeter
    extends java.lang.Object
    Data class to hold two double values (area and perimeter of a polygon).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double area  
      private double perimeter  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getArea()
      Gets the area
      double getPerimeter()
      Gets the perimeter
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • area

        private final double area
    • Method Detail

      • getArea

        public double getArea()
        Gets the area
        Returns:
        The area size
      • getPerimeter

        public double getPerimeter()
        Gets the perimeter
        Returns:
        The perimeter length