Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface Shape
- {
- //calculates and returns the area of the shape
- public abstract double getArea();
- //calculates and returns the perimeter of the shape
- public abstract double getPerimeter();
- //returns true if the area of the current shape is bigger than the
- //area of the otherShape, otherwise returns false.
- public abstract boolean hasBiggerArea(Shape otherShape);
- //returns true if the perimeter of the current shape is bigger than
- //the perimeter of the otherShape, otherwise returns false.
- public abstract boolean hasBiggerPerimeter(Shape otherShape);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement