Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract class Shape {
- private int x;
- private int y;
- }
- class Rectangle extends Shape {
- private int width;
- private int height;
- int setWidth() { return width; }
- int setHeight() { return height; }
- Str speak() { "I am a Ractangle but I'm a SHAPE TOO ! I JUST HAVE that starting coords, they are part of ME !" )
- int setStartXY( int sx, int sy ) { x = sx; y = sy; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement