Boolean Expressions: true or false
// Children and Seniors pay $10 admission. Everyone else pays $15
Double cost = 15.0;
Boolean child = this.guard.getBooleanFromUser( "Are you a child?" );
Boolean adult = this.guard.getBooleanFromUser( "Are you an adult?" );
if( adult || child ) {
cost = 10.0;
} else {
cost = 15.0;
}
this.guard.say( "That will be $" + cost );