Advertisement
Guest User

Untitled

a guest
Jun 7th, 2015
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2.  
  3. class Airplane implements IVehicle
  4. {
  5.  
  6. /**
  7. * @var bool
  8. */
  9. protected $leftEngine;
  10.  
  11. /**
  12. * @var bool
  13. */
  14. protected $rightEngine;
  15.  
  16.  
  17. public function start()
  18. {
  19. $this->leftEngine = true;
  20. $this->rightEngine = true;
  21. }
  22.  
  23. public function stop()
  24. {
  25. $this->leftEngine = false;
  26. $this->rightEngine = false;
  27. }
  28.  
  29. public function status()
  30. {
  31. return $this->leftEngine && $this->rightEngine ? "Flugzeugmotoren eingeschaltet" : "Flugzeugmotoren ausgeschaltet";
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement