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 1 / 3

Check out these classes that the intern created, which all have confusing names:

abstract class OtherClass extends GreatClass
{
}
abstract class SomeClass extends OtherClass
{
}
class GreatClass
{
}
class MyClass extends OtherClass
{
}
class Puppy extends SomeClass
{
}
function doSomething(OtherClass $thing)
{
    // ...
}

Based on the type-hint, objects of which classes could be passed to the doSomething() 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.