Source of Measurable.java


  1: // Measurable.java
  2: //  week09 code
  3: //  a very simple interface to experiment with
  4: // See also:
  5: //  Circle.java
  6: //  Rectangle.java
  7: //  MeasuringStuff.java

  9: // a class is measurable if
 10: public interface Measurable {

 12:     // it has a method like this (to get an object's area)
 13:     public double getArea();

 15:     // and it has a method like this (to get the object's perimeter)
 16:     public double getPerimeter();

 18: }