Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Square implements Shape
- {
- private double side;
- public Square()
- {
- this(1);
- }
- public Square(double side)
- {
- this.side=side;
- }
- public double area()
- {
- return side*side;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement