slides/Point.java
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 08 Nov 2021 23:17:51 +0000
changeset 415 fced9a61c881
parent 32 45557ad18ea6
permissions -rw-r--r--
update
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
public class Point {
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
  private final int x, y;
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
 
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
  public Point(int x, int y) {
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
    this.x = x;
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
    this.y = y;
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
  }
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
 
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
  public int x() { return x; }
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
 
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
  public int y() { return y; }
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
}