White Men Can’t Jump



$blackactor = 'Wesley Snipes';
$whiteactor = 'Woody Harrelson';

if (!$whitemenabletojump) {
    basketballmovie($blackactor, $whiteactor);
}

?>
Vote up this code0
  • http://www.eyalg.com/ Eyal Gurevitch

    class Actor {
    string _name;
    bool _isAbleToJump;
    bool _canListenToJimmy;
    bool _canHearJimmy;
    function new (string name) {
    _name = name;
    _canListenToJimmy = true;
    }
    }

    class WhiteActor like Actor {
    function new (string name) {
    _isAbleToJump = false;
    _canHearJimmy = false;
    }
    }

    class BlackActor like Actor {
    function new (string name) {
    _isAbleToJump = true;
    _canHearJimmy = true;
    }
    }

    BlackActor blackActor = new BlackActor (‘Wesley Snipes’);
    WhiteActor whiteActor = new WhiteActor (‘Woody Harrelson’);

    Movie basketballmovie = new Movie (blackActor, whiteActor);