Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by Jakub on 6/25/2016.
- */
- public class Rectangle extends Figure {
- private int z;
- public Rectangle() {
- super(2,2);
- }
- public Rectangle(int x, int y, int z) {
- super(x, y);
- this.z = z;
- }
- public int getZ() {
- return z;
- }
- public void setZ(int z) {
- this.z = z;
- }
- public int sum() {
- return getX() + getY() + getZ();
- }
- }
Add Comment
Please, Sign In to add comment