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
Should students be able to use their phones during class
Allushta [10]
Hmm..This is a tough answer it all depends on how the students use their cell phones and if they can handle the privilege...And if they could "Sure why not" and you should monitor the students too
5 0
3 years ago
What protocol runs on port 23?!?!
Vera_Pavlovna [14]
Telnet runs on port 23.
7 0
3 years ago
Read 2 more answers
Fourlotts Corp. provide integrated services that include storing manufactured goods, packaging, and delivering it to the dealers
PilotLPTM [1.2K]

Answer:

The answer is "Logistics provider of third parties".

Explanation:

In the given statement some information is missing, that is options, which can be described as follows:

a.Center for Allocation

b. Logistics provider of third parties

c. supplier

d. Manufacturer with contracts

The company provides contracted logistics facilities provided by any part of the sourcing and distribution operations. In the 3PL will have a specific definition for any service agreement requiring processing or shipment of goods, and certain choices were wrong, which can be explained as follows:

  • In option a, It includes products and services.
  • In option b, It is a person that provides the products.
  • In option d, It enables the customer to get off an incredibly important project, that saves a lot of cash.

7 0
3 years ago
covers a wide variety of applications such as web and computer-based training (CBT), and social networks. a. E-learning b. Model
mixer [17]

Answer:

Option (a) is the correct answer of this question.

Explanation:

E-Learning means that Electronic Learning. It covers a broad spectrum of applications, including online and computer-based training (CBT) and public networks.E-Learning is learning to use new technology to navigate curricula beyond a conventional classroom is known as Electronic learning.

  • E-learning is a nurturing environment that allows use of information and communication technologies (ICTs) as a pedagogical tool.
  • E-learning not a program distributed over a Disc or CD-ROM, a video tape or a TV channel.

<u>There are two types of E-learning are known as</u>:-

  1. Synchronous E-learning.
  2. Asynchronous E-learning

6 0
3 years ago
well im a gamer and i wait for a while befoer i accept a friend request from someone i know so i think its A
mamaluj [8]
What is your question though?
7 0
3 years ago
Other questions:
  • The part of the inside of a computer
    14·1 answer
  • It is possible to have motion in the absence of a force
    13·1 answer
  • 2. Which company was first able to send a text? (Verizon, AT&amp;T, Cricket???)
    12·1 answer
  • Write three function prototypes:
    14·1 answer
  • What is a clutch on a car
    6·1 answer
  • A license plate consists of 2 letters followed by 1 digit. How many license plates are possible if the first letter can be any l
    13·1 answer
  • Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design?
    8·1 answer
  • Create a program that calculates three options for an appropriate tip to leave after a meal at a restaurant.
    12·1 answer
  • Explain one rule the company must follow when using cookies on its website.
    13·1 answer
  • Who made the game Monopoly???
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!