The AP Exam uses the following relational (comparison) operators: =, ≠, >, <, ≥, and ≤.

As well, AND, OR and NOT are used instead of and, or and not.

A county 911 system uses an automated computer program to dispatch one of two ambulances. In order to dispatch the ambulance, the ambulance needs to be available and the emergency needs to be in the ambulance’s primary zone or the other ambulance is not available.

The following boolean variables are used:
ambOneAvail - set to true is ambulance one is available, otherwise set to false
ambTwoAvail - set to true is ambulance two is available, otherwise set to false
inZone - Set to true if the emergency is in the primary zone for the ambulance, otherwise set to false

Which of the following Boolean expressions can be used in a selection statement to cause ambulance one to be dispatched?

ambOneAvail AND (inZone OR NOT ambTwoAvail)

ambOneAvail AND (inZone OR ambTwoAvail)

ambOneAvail OR (inZone OR ambTwoAvail)

NOT ambTwoAvail AND (inZone OR ambOneAvail)

The correct Boolean expression that can be used in a selection statement to cause ambulance one to be dispatched is:

ambOneAvail AND (inZone OR NOT ambTwoAvail)