Computers and Technology

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)

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:00, adam4449
Jackson is teaching the decimal number system. he wants his students to know how to expand numbers by powers of 10. which is the correct order in which digits are assigned values in the decimal number system?
Answers: 1
image
Computers and Technology, 22.06.2019 14:30, chaparro0512
Create a pseudocode design to prompt a student for their student id and the titles of the three classes they want to add. the solution should display the student’s id and a total bill. • bill a student using the following rules: o students can only add up to 3 classes at a time.
Answers: 3
image
Computers and Technology, 22.06.2019 15:00, taylorsamodell3217
Who is the first president to use social media as part of his campaign strategy
Answers: 1
image
Computers and Technology, 23.06.2019 03:30, bellsbella34
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
Do you know the correct answer?
An office building has two floors. A computer program is used to control an elevator that travels be...

Questions in other subjects: