OOP (course 3): Inheritance, Abstract Classes, Interfaces and other amazing things
Broken Ship
  Start your All-Access Pass to unlock this challenge
Buy Access Login

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

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.