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
Paha777 [63]
3 years ago
8

If r is an instance of the above Person class and oddNum has been declared as a variable of type boolean, which of the following

correctly sets oddNum to true if Person object r has an odd number of children and to false otherwise?
oddNum = ( ( r.numChildren() % 2 ) != 0 );

if ( ( r.numChildren() % 2 ) == 0 )

oddNum = false;

else

oddNum = true;

oddNum = false;

for ( int k = 0 ; k < r.numChildren() ; k++ )

oddNum = !oddNum;

I only

II only

III only

I and II only

I, II, and III
Computers and Technology
1 answer:
cricket20 [7]3 years ago
4 0

Answer:

I, II, and III

Explanation:

The three are almost saying the same thing. the loop is one am a bit concerned about. but since the oddnum is set to false, the loop will work.

The one and two are pretty clear. to test for odd number, the easiest is to divide by two to see if there will be a remainder. That is what both first and second statement is trying to do.

You might be interested in
What is the first thing you should do when you discover a computer is infected with malware? The second thing?
Goshia [24]

Answer:

Quarantine the computer.

Explanation:

Malware can be characterized with negative software capable of causing various damages to a computer, such as theft of data and information, in addition to damage to devices.

In order to avoid having your computer infected with malware, it is essential to have installed reliable malware-checking software, in addition to taking all appropriate security measures when accessing the internet and never clicking on unknown or suspicious links.

Therefore, when realizing that the computer has been infected by malware, it is necessary to quarantine the computer and immediately disconnect from a network so that it does not infect other computers. The quarantine acts as an action where the infected file is moved to an encrypted folder where the malware cannot be executed and spread by the operating system.

3 0
3 years ago
What is a programming method that provides for interactive modules to a website?
Veseljchak [2.6K]

Answer:

Java?

Explanation:

8 0
3 years ago
What file name would allow you to easily find and edit your document later in Word Online?
DIA [1.3K]
The first one “ jane_essay 2_24_21 “
6 0
2 years ago
Read 2 more answers
Which of the following are agricultural industry clusters? Human population systems, computer technoloy biotechnology or food pr
kondor19780726 [428]

Biotechnology

Food Products and Processing Systems.

Further explanation

Career clusters help prepare learners with knowledge that they need to use towards achieving their career goals. One such career cluster is the Agriculture, Food, and Natural Resources career cluster which is divided into seven pathways. They include:

  • Food Products and Processing Systems.
  • Biotechnology Systems
  • Agribusiness Systems
  • Plant Systems
  • Animal Science
  • Environmental Service Systems
  • Natural Resource Systems

This brings us to our answers above. Those working in the Food Products and Processing Systems pathway are responsible in discovering new food sources and coming up with ways to process and store food set out by industry regulation. On the other hand, biotechnology systems deal with techniques that use science to solve problems concerning living organisms and anyone thinking about pursuing this pathway ought to demonstrate competence in the application of biotech in the context of Agriculture, Food, and Natural Resources.

Learn about Agriculture, Food, and Natural Resources career cluster

brainly.com/question/6457497

brainly.com/question/11364780

#LearnWithBrainly

7 0
3 years ago
The amount of magnification gained from the extension tube is dependent on the focal length of the lens.
jenyasd209 [6]
The statement, "The amount of magnification gained from the extension tube is dependent on the focal length of the lens" is true.
6 0
3 years ago
Read 2 more answers
Other questions:
  • The technical relationship between inputs and outputs, which is needed to understand the difference between the short run and th
    5·1 answer
  • Shut down and unplug the computer. Remove the CPU case lid. Locate the various fans, and then use
    11·1 answer
  • Which of the following is most likely to be considered plagiarism? a. Intentionally reporting the results of inaccurate statisti
    11·1 answer
  • If you had to choose, would you consider yourself more of an internet celebrant or a skeptic? On balance, do you think the inter
    10·1 answer
  • Does anyone know any nitro type hack??
    13·2 answers
  • For questions 19 - 21, assume that Student, Employee and Retired are all subclasses of Person, and all four classes have differe
    9·1 answer
  • Information is best described as
    10·1 answer
  • How I to turn this ''loop while'' in ''loop for''? var i = 0; while (i &lt; 20) { var lineY = 20 + (i * 20); line(0, lineY, 400,
    11·1 answer
  • Wilma is looking for facts about social media for her research project. What fact should she use for her project?
    15·1 answer
  • How should your fingers rest upon the home row keys?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!