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
Furkat [3]
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:
Nikolay [14]3 years ago
3 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
Netiquette is the
e-lub [12.9K]

Answer:

C

Correct or acceptable way of communicating

4 0
3 years ago
What message will scroll?
Tasya [4]
Yeah there no picture
6 0
3 years ago
Read 2 more answers
major, large city newspaper endorsements often carry important weight, especially in down ballot races for local offices.
Lunna [17]

True- major, large city newspaper endorsements often carry important weight, especially in down ballot races for local offices.

<h3>What is endorsement?</h3>

Endorsements are a type of advertising that makes use of well-known figures or celebrities that enjoy a high level of public awareness, respect, and/or recognition. These persons serve as brand ambassadors by using their names or likenesses to advertise a good or service. An endorsement, in a broader sense, is an expression of agreement with or support for something or someone; the endorser may or may not get payment. A blank endorsement is one on which the endorser merely signs his name and the bearer is the recipient. Special Endorsement: This is where the endorser signs and specifies who will get the cash. Endorsement with Restrictions: This prevents further discussion.

To know more about endorsement visit:

brainly.com/question/29734234

#SPJ1

3 0
1 year ago
-) An attribute is a(n)?
Anarel [89]
<h3>An attribute is a characteristic.In a data base management system,an attribute refers to a database component,such as a table.It also may refer to a database field.</h3>

6 0
3 years ago
echnician A says that underinflation can increase the rolling resistance of a tire. Technician B says that underinflation can ca
max2010maxim [7]

Answer:

c)both a and b

Explanation:

If the tires are under inflated the the rolling resistance increases due to more surface are of tire now touches the ground hence there is more friction.Since the rolling resistance increases the tire will face difficulty in turning hence the steering the tires will become more hard.Since rolling resistance is increased so the engine has to work more to run the car hence it will consume more fuel.

4 0
3 years ago
Other questions:
  • When desktop publishing software can interact with another software program, the two are said to
    6·1 answer
  • Write pseudocode instruction to carry out each of thefollowing computational operations.
    10·1 answer
  • Differences between the first four generations of computers​
    12·1 answer
  • Use rounding to decide if the answer is reasonable. Write
    15·1 answer
  • PLEASE ANSWER
    9·1 answer
  • Which of the following statements best describes the relative amount of content held by digital libraries vs. the amount held by
    12·1 answer
  • Why is it important to organize your computer files?<br><br> “With a explanation”
    6·1 answer
  • CP/IP over Ethernet supports basic frames with a total size of up to 1518 bytes (including both the message payload and headers)
    11·1 answer
  • Задание: Построить иерархию классов в соответствии с вариантом задания. Построить диаграммы классов.
    8·1 answer
  • Briefly the conceptual model of effective computer based instruction for adults outlining three units (output, Process and input
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!