Guest User

Untitled

a guest
Jun 24th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1.  
  2. /**
  3. * Created by Jakub on 6/25/2016.
  4. */
  5. public class Rectangle extends Figure {
  6.  
  7. private int z;
  8.  
  9. public Rectangle() {
  10. super(2,2);
  11. }
  12.  
  13. public Rectangle(int x, int y, int z) {
  14. super(x, y);
  15. this.z = z;
  16. }
  17.  
  18. public int getZ() {
  19. return z;
  20. }
  21.  
  22. public void setZ(int z) {
  23. this.z = z;
  24. }
  25.  
  26. public int sum() {
  27. return getX() + getY() + getZ();
  28. }
  29.  
  30.  
  31. }
Add Comment
Please, Sign In to add comment