// Can I can be your friend too?
Class Friend {
if ($joke)
laugh(“Jeez, you’re funny!”);
elseif ($laugh)
smile(“I’m glad you enjoyed it”);
elseif ($cry)
comfort(“Things will get better”);
elseif ($lonely)
hang_out(“You wanna go anywhere today?”);
elseif ($angry)
calm();
else
offer_chocolate(“Want some chocolate?”);
}
// And so I guess we’re friends now?
Real_Friend extends Friend {
// There are no functions that you can see in this class.
// There are only hidden variables, with unknown values.
// Stop analysing. There’s nothing here. It’s intangible.
}
Leave a Reply