<?php
class Punkt
{
  public $x, $y;

  public static function nowyPunkt()
  {
    $punkt = new Punkt();
    $punkt.ustawXY(0, 0);
    return $punkt;
  }

  public function ustawX($x)
  {
    $this->x = $x;
  }
  public function ustawY($y)
  {
    $this->y = $y;
  }
  public function ustawXY($x, $y)
  {
    $this->x = $x;
    $this->y = $y;
  }
  public function pobierzX()
  {
    return $this->x;
  }
  public function pobierzY()
  {
    return $this->y;
  }
}

?>