subject

An office building has two floors. A computer program is used to control an elevator that travels between the two floors. Physical sensors are used to set the following Boolean variables.

Variable 1: onFloor1 Description: Set to true if the elevator is stopped on floor 1; otherwise set to false

Variable 2: onFloor2 Description: Set to true if the elevator is stopped on floor 2; otherwise set to false

Variable 3: callTo1 Description: Set to true if the elevator is called to floor 1; otherwise set to false

Variable 4: callTo2 Description: Set to true if the elevator is called to floor 2; otherwise set to false

The elevator moves when the door is closed and the elevator is called to the floor that it is not currently on. Which of the following Boolean expressions can be used in a selection statement to cause the elevator to move?

A. (onFloor1 AND callTo2) AND (onFloor2 AND callTo1)

B. (onFloor1 AND callTo2) OR (onFloor2 AND callTo1)

C. (onFloor1 OR callTo2) AND (onFloor2 OR callTo1)

D. (onFloor1 OR callTo2) OR (onFloor2 OR callTo1)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:30
Many everyday occurrences can be represented as a binary bit. for example, a door is open or closed, the stove is on or off, and the fog is asleep or awake. could relationships be represented as a binary value? give example.
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Which of the following statements is false? a. a class can directly inherit from class object. b. if the class you're inheriting from declares instance variables as private, the inherited class can access those instance variables directly. c. a class's instance variables are normally declared private to enforce good software engineering. d. it's often much more efficient to create a class by inheriting from a similar class than to create the class by writing every line of code the new class requires.
Answers: 3
question
Computers and Technology, 23.06.2019 16:30
Which of the following is not an enhancement to the standard wiki to make it more attractive for corporations? encryptionwork spacespermission toolspredictive text
Answers: 2
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
You know the right answer?
An office building has two floors. A computer program is used to control an elevator that travels be...
Questions
Questions on the website: 13722362