Run »
×
Change Orientation
isOn = true; } public function deactivate() { $this->isOn = false; } public function isActive() { return $this->isOn; } } $machine = new Kettle(); $machine->activate(); if($machine->isActive()) { echo "The machine is on"; } else { echo "The machine is off"; } echo "
"; $machine->deactivate(); if($machine->isActive()) { echo "The machine is on"; } else { echo "The machine is off"; } ?>
The machine is on
The machine is off
×
Report a Problem:
Your E-mail:
Page address:
Description:
Submit