Start your All-Access Pass to unlock this challenge
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