예제 #1
0
$pluto = new Perro("Pluto", "Macho", "Naranja", "Pichon Maltes");
$lasie = new Perro("Lasie", "Hembra", "Marrón", "Pastor Alemán");
$piolin = new Canario("Piolín", "Macho", "Amarillo", "Pecho Blanco", "Espeso");
$piolina = new Canario("Piolína", "Hembra", "Blanco", "Pecho Naranja", "Ligero");
$happyFeat = new Pinguino("Happy Feat", "Macho", "Negro", "Emperador", "Ligero");
$guancho = new Lagarto("Guancho", "Macho", "Verde", "Feo", "Grande");
//Impresión de animales
echo "<hr>{$pluto}<br>";
echo "<br>" . $pluto->ladra();
echo "<br>" . $pluto->corre();
echo "<br>" . $pluto->lava();
echo "<br>" . $pluto->vuela();
echo "<br>" . $pluto->pare();
echo "<br>" . $pluto->mama();
echo "<hr>{$lasie}<br>";
echo "<br>" . $lasie->pare();
echo "<hr>{$piolin}<br>";
echo "<br>" . $piolin->come();
echo "<br>" . $piolin->corre();
echo "<br>" . $piolin->lava();
echo "<br>" . $piolin->vuela();
echo "<br>" . $piolin->canta();
echo "<br>" . $piolin->pia();
echo "<br>" . $piolin->ovoposita();
echo "<hr>{$piolina}<br>";
echo "<br>" . $piolina->ovoposita();
echo "<hr>{$happyFeat}<br>";
echo "<br>" . $happyFeat->pia();
echo "<br>" . $happyFeat->grazna();
echo "<br>" . $happyFeat->desliza();
echo "<hr>{$guancho}<br>";