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, 22.06.2019 23:00
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
1. ask the user how many questions are in the quiz. 2. ask the user to enter the key (that is, the correct answers). there should be one answer for each question in the quiz, and each answer should be an integer. e.g., 34 7 13 100 81 3 9 10 321 12 might be the key for a 10-question quiz. you will need to store the key in an array. 3. ask the user to enter the answers for the quiz to be graded. there needs to be one answer for each question. note that these answers do not need to be stored; each answer can simply be compared to the key as it is entered. 4. when the user has entered all of the answers to be graded, print the number correct and the percent correct. 5. add a loop so that the user can grade any number of quizzes with a single key. after the results have been printed for each quiz, ask "grade another quiz? (y/n)." note: you only have one array (the key). you are not creating a new key for each set of quiz answers.
Answers: 3
question
Computers and Technology, 23.06.2019 20:00
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
question
Computers and Technology, 24.06.2019 10:40
Joe needs to see the slide transitions and animations he has applied to his slides in a large view. which presentation view should he use? in which tab would joe find the animations option to make further changes, if any?
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
question
Mathematics, 21.01.2022 14:00
question
Mathematics, 21.01.2022 14:00
Questions on the website: 13722363