1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
baherus [9]
3 years ago
5

A bank uses a computer program during the night to tell if the alarm should ring. Sensors in the bank set the following Boolean

variables:
vaultClosed: set to true if the bank vault is closed; otherwise false
heardNoise: set to true if a microphone heard noise; otherwise false
sawMovement: set to true if a camera saw movement in the bank; otherwise false

The automatic alarm should notify the police if there is noise and movement in the bank, or if the bank vault is open. Which boolean expressions can be used in a selection statement to ring the alarm?
Computers and Technology
1 answer:
Snowcat [4.5K]3 years ago
5 0

Answer:

(vaultClosed OR (heardNoise AND sawMovement))

Explanation:

The first step is to understand the conditions that must be satisfied to alarm notifies the police.

"The automatic alarm should notify the police IF there is noise and movement in the bank, or <u>IF</u> the bank vault is open".

The first IF (bold), sets the first condition which is formed by two sub-conditions: "noise AND movement". The word AND is very important because both sub-conditions must be satisfied, if there is noise but no movement, the the whole condition is not satisfied and the alarm does not notify, and vice versa.

The second IF (underlined), sets the second condition and is about the bank vault is open.

In conclusion, there are two ways to alarm notify the police.

  1. There is noise and movement (must be both)
  2. The bank vault is open

As can be either, the operator OR is used.

(condition 1) OR (condition 2)

Now, condition 1 is formed by two.

<u>FINAL EXPRESSION</u>

(condition 1) OR (condition 2)

((heardNoise equals True AND sawMovement equals True) OR vaultClosed equals True)

<u>REAL CODE</u>

Depending on the programming language you are using, the way to write the expression could vary. If C language is used, the expression would be:

if((heardNoise==1 && sawMovement==1) || vaultClosed==1))

The number 1 refers to the word TRUE

You might be interested in
John is runnig his Database application on a single server with 24 Gigabytes of memory and 4 processors. The system is running s
spayn [35]

Answer:

Vertical Scaling

Explanation:

Vertical scaling means the ability to increase the capacity of existing hardware or software by adding resources. In this case, more GB is added (8GB) to the server to address the problem. So vertical scaling is the resultant type john is expecting.

3 0
3 years ago
Some operating systems add the command interpreter to the kernel .what will be the justification for this design principle?
stira [4]

Answer:

Some operating systems add the command interpreter to the kernel. What will be the justification for this design principle? It displays all the apps and programs in the computer. Fab Numbers Sid wants to find out the average of Fab numbers.

Explanation:

Some operating systems add the command interpreter to the kernel. What will be the justification for this design principle? It displays all the apps and programs in the computer. Fab Numbers Sid wants to find out the average of Fab numbers.

3 0
2 years ago
Who was the first person to develop http the language in which servers and browsers communicate
Rudiy27
The answer would be Tim Berners- lee
6 0
3 years ago
Yooooooooooooooo
patriot [66]

Answer:

A-A Boolean search

Explanation:

8 0
3 years ago
Read 2 more answers
A hydraulic lift has a mechanical advantage of 5. If the load weighs 350 N, what effort is required to lift the weight? Provide
Dmitrij [34]

If the load weighs 350 N, the effort that is required to lift the weight is 70 N

To answer the question, we need to know what mechanical advantage is.

<h3>What is mechanical advantage?</h3>

The mechanical advantage of the hydraulic lift M.A = L/E where

  • L = load and
  • E = effort.
<h3>Effort required to lift the weight</h3>

Making E subject of the formula, we have

E = L/M.A

Given that

  • M.A = 5 and
  • L = 350 N,

substituting the values of the variables into the equation, we have

E = L/M.A

E = 350 N/5

E = 70 N

So, the effort that is required to lift the weight is 70 N

Learn more about mechanical advantage here:

brainly.com/question/26440561

#SPJ1

7 0
3 years ago
Other questions:
  • When looking at an object or process to code, it is important to think of as general a solution as possible and consider all the
    13·1 answer
  • The CPU package is installed using the ____ process
    7·1 answer
  • How globalization is related to communication technology?
    6·1 answer
  • What sound signal tells another boater that you wish to pass on your starboard (right) side?
    15·1 answer
  • If you download a virus onto ur computer which is the best way to get rid of it
    9·2 answers
  • Which type of account typically has low liquidity?
    7·1 answer
  • We need ____ pointers to build a linked list.
    6·1 answer
  • The easiest way to run a web page that’s already in your browser after you’ve made changes to the code for the page is to
    6·1 answer
  • E-What is the important of Recycle bin?<br>Ans:​
    12·1 answer
  • Creation of network is known as…?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!