Start your All-Access Pass to unlock this challenge
Challenge 2 / 3
Look at the following code:
abstract class AbstractShip
{
private $strength = 0;
abstract public function getType()
{
return 'ship';
}
public function setStrength($number)
{
$this->strength = $number;
}
public function getStrength()
{
return $this->strength;
}
}
class EmpireShip extends AbstractShip
{
public function getType()
{
return 'empire ship';
}
}
class RebelShip extends AbstractShip
{
}
What error will you see?
Skip challenges and go to theNext Chapter