Package shape.warmup

Class Rectangle

java.lang.Object
shape.warmup.Rectangle
All Implemented Interfaces:
Shape

public class Rectangle extends Object implements Shape
Author:
Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
  • Constructor Details

    • Rectangle

      public Rectangle​(double x, double y, double width, double height)
  • Method Details

    • getX

      public double getX()
    • getY

      public double getY()
    • getWidth

      public double getWidth()
    • getHeight

      public double getHeight()
    • area

      public double area()
      Specified by:
      area in interface Shape