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

Challenge 3 / 3

Look at the following code written by your trusty colleague:

abstract class AbstractShip
{
    // ...
}

class EmpireShip extends AbstractShip
{
    // ...
}

class RebelShip extends AbstractShip
{
    // ...
}

function clearTakeoff(AbstractShip $thing)
{
    // ...
}

Why might your colleague have chosen to use the AbstractShip type hint in the clearTakeoff() function?

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.