00001 <?php 00024 class BaseDrive extends BaseSimulator { 00025 // Price of this drive 00026 private $price = 0.00; 00027 // PS-Zahl 00028 private $horsePower = 0; 00029 // Anzahl Nocken 00030 private $numCams = 0; 00031 00032 // Konstruktor 00033 protected function __construct ($className) { 00034 // Call parent constructor 00035 parent::__construct($className); 00036 } 00037 00038 // Setter-Methode fuert PS-Zahl 00039 public final function setHorsePower ($hp) { 00040 $this->horsePower = (int) $hp; 00041 } 00042 00043 // Setter-Methode fuer Nockenanzahl 00044 public final function setNumCams ($cams) { 00045 $this->numCams = (int) $cams; 00046 } 00047 00048 // Setter for price 00049 public final function setPrice ($price) { 00050 $this->price = (float) $price; 00051 } 00052 00053 // Getter for price 00054 public final function getPrice () { 00055 return $this->price; 00056 } 00057 00058 public final function removePrice () { 00059 unset($this->price); 00060 } 00061 } 00062 00063 // [EOF] 00064 ?>
1.5.6