Back to slide -- Keyboard shortcut: 'u'        next -- Keyboard shortcut: 'n'          point/2d3d/Point.cs - The class Point2D.Lecture 7 - slide 11 : 40
Program 1

using System;

public class Point2D {
  private double x, y;

  public Point2D(double x, double y){
   this.x = x; this.y = y;
  }

  public double X{
    get {return x;}
  }

  public double Y{
    get {return y;}
  }

  public void Move(double dx, double dy){
    x += dx; y += dy;
  }

  public override string ToString(){
    return "Point2D: " + "(" + x + ", " + y + ")" + ".";
  }
}