Advertisement
Guest User

Untitled

a guest
Oct 27th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. abstract class Shape {
  2. private int x;
  3. private int y;
  4. }
  5.  
  6. class Rectangle extends Shape {
  7. private int width;
  8. private int height;
  9.  
  10. int setWidth() { return width; }
  11. int setHeight() { return height; }
  12.  
  13. Str speak() { "I am a Ractangle but I'm a SHAPE TOO ! I JUST HAVE that starting coords, they are part of ME !" )
  14.  
  15. int setStartXY( int sx, int sy ) { x = sx; y = sy; }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement