class Punkt { private int x, y; public Punkt(int x, int y) { this.x = x; this.y = y; } public void Wyzeruj() { this.x = 0; this.y = 0; } public void Przesun(int a, int b) { this.x += a; this.y += b; } public override string ToString() { return "(" + this.x + "," + this.y + ")"; } } class Program { static void Main(string[] args) { Punkt p = new Punkt(4, 9); Console.WriteLine(p); p.Wyzeruj(); Console.WriteLine(p); p.Przesun(7, 24); Console.WriteLine(p); } }