<?php
class Punkt
{
  public $x, $y;
  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;
  }
}

class Punkt3D extends Punkt
{
  public $z;
  public function ustawZ($z)
  {
    $this->z = $z;
  }
  public function ustawXYZ($x, $y, $z)
  {
    $this->ustawXY($x, $y);
    $this->z = $z;
  }
  public function pobierzZ()
  {
    return $this->z;
  }
}

?>