You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SolidPoint.java 473B

123456789101112131415161718192021222324
  1. package figures.primitives.solid;
  2. import java.util.Collection;
  3. import java.lang.String;
  4. import figures.primitives.planar.*;
  5. public class SolidPoint extends Point {
  6. private int z;
  7. public SolidPoint(int x, int y, int z) {
  8. super(x, y);
  9. this.z = z;
  10. }
  11. public int getZ() { return z; }
  12. public void setZ(int z) { this.z = z; }
  13. public void incrXY(int dx, int dy) {
  14. super.incrXY(dx, dy);
  15. setZ(getZ() + dx + dy);
  16. }
  17. }