My problem was for example like this in PHP :
class Car{
public function Car(){
}
public function equipment(){
return 'Your car has 3 doors';
}
}
abstract class AddEquipment extends Car{
public abstract function equipment();
}
class AirCondition extends AddEquipment{
private $newcar;
private function AirCondition(){
$newcar = $car;
}
public abstract function equipment(){
return '';
}
}
In Java it was OK to create object like this, but PHP is throwing
- Fatal error: Cannot make non abstract method Car::equipment() abstract in class AddEquipment
Anyone know what I am doing wrong here? :/