k6rgus()*$this->p6hjaPindala(); } } class Tikutops extends Kujund{ public function k6rgus(){return 1.5;} public function p6hjaPindala(){return 10;} } class Tynn extends Kujund{ private $r, $h; function __construct($r, $h){ $this->r=$r; $this->h=$h; } public function k6rgus(){return $this->h;} public function p6hjaPindala(){ return 3.14*$this->r*$this->r; } } $t=new Tikutops(); $vaat=new Tynn(15, 40); echo $t->ruumala()." ".$vaat->ruumala(); ?>