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
sammy [17]
4 years ago
9

Analyze the following code (in both cases number has been declared and initialized): Code 1: boolean even; if (number % 2 == 0)

even = true; else even = false; Code 2: boolean even = (number % 2 == 0);
Computers and Technology
1 answer:
shusha [124]4 years ago
8 0

Answer:

Both codes are correct.The value of even is true when the number is even.

Explanation:

Code 1:

number %2 ==0 means that when dividing number by 2 is the remainder coming out is zero.If it is true then even becomes is true if it is false then else statement is executes in which even becomes false.Means the number is odd.This code is simple and easy to understand.

Code 2:-

This code is a bit tricky and takes time to understand.even becomes true

when the number is divisible by 0 and false when it is not.

You might be interested in
What does % find on edhesive??
statuscvo [17]

Answer:

Explanation: What is that word you typed?

3 0
3 years ago
LITERALLY PLS ANYONE!!! 90 pointsss!
Doss [256]

7. Intentional Virus Setting is when you the user purposely spread computer viruses in order to do harm. It should be noted that this is highly illegal (no duh) with a sentence of up to 10 years and $250,000 in penalties assuming you are convicted under the Computer Fraud and Abuse Act of 1986 here in the States.

8. intrusion of solitude, appropriation of name or likeness, public disclosure of private facts, and false light.

9.  Intentionally creating and/or sending a virus and infecting people's computers is against the law, and can result in jail time or a fine.

10. Some examples are: Deception - Lying about how information will be used. Violation of confidentiality - Disclosing someone's personal information without consent. Intrusion - Interference in an employee's personal life. Misappropriation - Using a person's likeness to promote a product without his consent.

11. Everyone wants PRIVACY for themselves, and everyone wants ACCOUNTABILITY from others. Privacy is a basic human need, and invasion of privacy can have serious psychological and emotional consequences, including paranoia, anxiety, depression and broken trust. Invasion of privacy is both a legal and an ethical issue.

12. A cause of action for invasion of privacy entitles the plaintiff to recover damages for the harm to the particular element of his or her privacy that is invaded. Thus, one who suffers an intrusion upon his or her solitude or seclusion, may recover damages for the deprivation of his or her seclusion.

13. An acceptable use policy (AUP) is a document stipulating constraints and practices that a user must agree to for access to a corporate network or the Internet. Many businesses and educational facilities require that employees or students sign an acceptable use policy before being granted a network ID.

14. Intellectual property refers to creations of the mind: inventions; literary and artistic works; and symbols, names and images used in commerce. Intellectual property is divided into two categories: Industrial Property includes patents for inventions, trademarks, industrial designs and geographical indications.

PLEASE PLEASE PLEASE HELP WITH MY RECENT!!!!!!

btw hope this helps if it does please make brainliest :)

6 0
3 years ago
Read 2 more answers
What steps can be used to open the Custom AutoFilter dialog box? Select any cell in the data range.
noname [10]

Answer:

Data

Sort and Filter

Text Filters

Explanation:

Proof that this answer is correct in the file attached.

6 0
3 years ago
What is unit testing? a. Checking that the integer values of a function use proper units (yards, meters, etc.) b. Ensuring a pro
egoroff_w [7]

Answer:

d. Individually testing a small part (or unit) of a program, typically a function, using a separate program called a test harness.

Explanation:

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications. There are seven (7) main stages in the creation of a software and these are;

1. Planning.

2. Analysis.

3. Design.

4. Development (coding).

5. Testing.

6. Implementation and execution.

7. Maintenance.

Unit testing can be defined as a software development procedure that involves the process of individually testing a small part (or unit) of a program, typically a function, using a separate program called a test harness.

This ultimately implies that, if the observed behavior of the small part of a software program is consistent with the expectations, then the unit test is considered a pass. Otherwise, the unit test failed.

8 0
3 years ago
_______ are malicious programs that come into a computer system disguised as something else such as a free computer game or scre
Lady_Fox [76]

Answer:

Trojan horses

Explanation:

4 0
3 years ago
Other questions:
  • It is important to keep a copy of your written plan and safety records off-site. A) True B) False
    6·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    14·1 answer
  • An automated search feature used by search engines to find results that match your search terms is called spider or
    13·1 answer
  • In a bubble sort, you use a(n) ____ loop to make pair comparisons.
    5·1 answer
  • What is a burned edge ?
    8·1 answer
  • When a user inserts a PivotTable, where will it be inserted?
    15·1 answer
  • Recall that two strings u and v are ANAGRAMS if the letters of one can be rearranged to form the other, or, equivalently, if the
    7·1 answer
  • What is information processing cycle​
    12·1 answer
  • A computer is performing a binary search on the sorted list of 7 numbers below.
    10·2 answers
  • What is an example of using the Internet of Things (IoT) to deliver innovative Cloud based solutions to customers?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!