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

Challenge 2 / 2

Look at the following abstract classes and interfaces:

abstract class AbstractShip
{
    protected function fly()
    {
        print "I'm flying!";
    }
}

interface ShipInterface
{
    abstract public function getType();

    abstract public function getName();
}

interface WeaponShipInterface
{
    public function getWeapon();
}

We want to be sure that our RebelShip class contains all these methods: fly(), getType(), getName(), and getWeapon(). How could we achieve it?

Skip challenges and

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.