Challenge 1 / 1
Look at the following classes:
class Ship
{
public function printType()
{
echo 'Empire Ship';
$this->printMotto();
}
public function printMotto()
{
echo 'I like to fly!';
}
}
class RebelShip extends Ship
{
public function printType()
{
echo 'Rebel Ship';
}
}
What is the result of the following code:
$ship = new Ship();
$rebelShip = new RebelShip();
$ship->printType();
$rebelShip->printType();
Skip challenges and go to theNext Chapter