package Exam;

class Point {
	protected long x_, y_;
	public Point(long x, long y) { x_ = x; y_ = y; }
	public Point plus(Point other) {
		return new Point(x_ + other.x_, y_ + other.y_);
	}
	public Point minus(Point other) {
		return new Point(x_ - other.x_, y_ - other.y_);
	}
	
	public String toString() {
		return "Point(" + x_ + "," + y_ + ")";
	}
	
	public static void demo() {
		System.out.println("\n\nStarting Point.demo()");
		Point a = new Point(1,2);
		Point b = new Point(3,4);
		Point c = a.plus(b);
		System.out.println("c = " + c);
	}
}
