Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Airplane implements IVehicle
- {
- /**
- * @var bool
- */
- protected $leftEngine;
- /**
- * @var bool
- */
- protected $rightEngine;
- public function start()
- {
- $this->leftEngine = true;
- $this->rightEngine = true;
- }
- public function stop()
- {
- $this->leftEngine = false;
- $this->rightEngine = false;
- }
- public function status()
- {
- return $this->leftEngine && $this->rightEngine ? "Flugzeugmotoren eingeschaltet" : "Flugzeugmotoren ausgeschaltet";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement