Start your All-Access Pass to unlock this challenge
Challenge 1 / 1
Look at the following code:
abstract class AbstractShip
{
abstract public function getType();
abstract public function getName();
protected function fly()
{
print "I'm flying!";
}
}
abstract class AbstractWeaponShip extends AbstractShip
{
abstract public function getWeapon();
}
class RebelShip extends AbstractWeaponShip
{
public function getName()
{
return 'rebel ship';
}
}
What other methods does RebelShip
have to implement from the abstract class?
Skip challenges and go to theNext Chapter