Thursday, March 23, 2006

code..turn this into a working code

//Class lizard
class Lizard
{
public $length;
//must be capitalized!
public $weight_in_grams;
private $name;
private $sex;
private $willingness_to_mate;
private $laziness;
public $num_roaches_consumed;

//here we define functions

public function numlikelytoconsumeweekly($weight_in_grams, $laziness)
{
//400 gram lizard
//if the lizard is lazy at 400 grams it will eat 5 roaches
//if it is energetic 10
//at 600 grams it will eat 15 if lazy and 20 if not lazy
if ($weight_in_grams) {

} elseif ($weight_in_grams) {

} else {

}
}
}

0 Comments:

Post a Comment

<< Home