Class Triangle


  • public class Triangle
    extends Figure
    • Constructor Summary

      Constructors 
      Constructor Description
      Triangle​(double height, double width)  
      Triangle​(java.lang.String unit)  
      Triangle​(java.lang.String unit, double height, double width)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double surface()
      Abstract class that should return the surface of a figure.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Triangle

        public Triangle​(java.lang.String unit,
                        double height,
                        double width)
      • Triangle

        public Triangle​(java.lang.String unit)
      • Triangle

        public Triangle​(double height,
                        double width)
    • Method Detail

      • surface

        public double surface()
        Description copied from class: Figure
        Abstract class that should return the surface of a figure.
        Specified by:
        surface in class Figure
        Returns:
        The surface of the figure in the form of a double.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Figure