Class Circle


  • public class Circle
    extends Figure
    Class representing a circle.
    • Constructor Summary

      Constructors 
      Constructor Description
      Circle​(double radius)  
      Circle​(java.lang.String unit)  
      Circle​(java.lang.String unit, double radius)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setRadius​(int radius)  
      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

      • Circle

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

        public Circle​(java.lang.String unit,
                      double radius)
      • Circle

        public Circle​(double radius)
    • 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.
      • setRadius

        public void setRadius​(int radius)
      • toString

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