Exemplo n.º 1
0
 public function __toString()
 {
     return "Se ha creado figura" . $this->getNumFiguras() . " de tipo Cuadrado: " . parent::__toString() . ", Ancho=" . $this->ancho;
 }
Exemplo n.º 2
0
 public function __toString()
 {
     $origenToString = parent::__toString();
     return 'Cuadrado[ origen ' . $origenToString . ', lado ' . $this->ancho . ']';
 }
Exemplo n.º 3
0
 public function __toString()
 {
     return "Se ha creado figura " . $this->getNumFiguras() . " de tipo circulo: " . parent::__toString() . ", radio= " . $this->radio . " ";
 }
Exemplo n.º 4
0
 public function __toString()
 {
     return "Se ha creado figura " . $this->getNumFiguras() . " de tipo Triangulo: " . parent::__toString() . ", Base=" . $this->base . ", Altura=" . $this->altura;
 }