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
If you notice files being transferred to or from your computer a. Simply close the window c. Tell the lab instructor b. Open a n
a_sh-v [17]

Answer:

The best answer is letter D.  

Explanation:

Downloading of files without your permission is a form of security threat and attack. You as unwilling victim will have your files and private information stolen.

One of the basics of internet security is to terminate any connection that you have in a network to stop the possible attack or threat. Worst case scenario is we can shut down our computers or devices or gadgets. But if we can just terminate the connection without performing a force shut down on the device, it is much better. This will give us more time to save what we are working on and to prevent losing important works or data. Terminating the connection from the network comes in various activities such as:  

*Disconnect from the internet - this is one of the most effective method. As most of the attacks are coming from external threats such a hacking.  

*Closing the browser - this could be helpful as well. Hackers are using browser to monitor their victims. And malwares and adwares are most active while we use browsers as they are embedded and using it to propagate to peform their activities.  

*Disconnect from the local network - if you have closed the internet connection and any active software that you are working on presently and the downloading of files still persists, probably the attack comes from your local network. You must close any connection that you have within the local network.

*Deleting the recent files you have downloaded - You must delete any recent files that you just downloaded from your email or from the internet. There might be malware embedded in the file. Malwares are used by hackers to get in to their victims computer without them knowing it.

Then after terminating all the connections, you must call on your Instructor's attention. He / She is the authority in charge and must be aware of the situation.

5 0
3 years ago
Read 2 more answers
Susan wants to play softball and work after school. She cannot do both, so she decides to play softball. What is her opportunity
marta [7]
Opportunity cost is what you give up to do something else. Since she decided to play softball after school, she cannot work so the answer is B
5 0
3 years ago
Read 2 more answers
Add criteria to this query to return only the records where the value in the SubscriptionType field is Self or Family and the va
miss Akunina [59]

Click Run in the Results group under the Design tab. Only show records in the search results that have a Credits field value greater than 120. To see the results, run the query. Click the criterion row for the Credits field and enter >120.

<h3>The meaning of the criterion =200</h3>

Equal to or less than 200. To compute statistics like Sum, Average, or Count, add a Total row to the query datasheet.

<h3>How may criteria be set in an Access query?</h3>

Open the query in Design view and choose the fields (columns) you want to set criteria for in order to add criteria to an Access query. Double-click the field to add it to the design grid if it isn't already there.

To know more about criterion row visit:-

brainly.com/question/7301380

#SPJ4

4 0
1 year ago
____ hack systems to conduct terrorist activities through network or Internet pathways
Advocard [28]

Answer:

Cyberterrorists

Explanation:

Cyberterrorists -

These are the people who illegally , without any authentication , are able access some other person's personal system or internet server , are referred to as cyber terrorists.  

Internet service is used in this process , which can lead to loss of life , harm , threat or some illegal practice.  

Hence, from the statement of the question,  

The correct term is cyberterrorists.

6 0
3 years ago
When is a handrail required for stairs
ch4aika [34]

Answer: when is not able to get up the stairs like a normal person

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Given the function definition
    12·1 answer
  • Who invented the ENIAC? More than one answer may apply.
    14·1 answer
  • _____ can render data useless to unauthorized users who might have violated some of the database security layers.
    7·1 answer
  • the technique of blocking some parts of a photograph to emphasize (or draw attention to) another part of the same photograph is
    8·1 answer
  • Read the following example cover letter: To Ms. March: I was excited to see your opening for a customer support specialist with
    13·1 answer
  • Which osi/iso layer is responsible for determining the best route for data to be transferred?
    5·1 answer
  • Your digital footprint says a lot about you, but not everything is true or accurate. When you're a high school or college studen
    13·1 answer
  • The technology dealing with robots is called
    6·1 answer
  • Leroy wants to keep the bride and groom in a picture, but remove the rest of the family. Which photo-editing tool should Leroy u
    14·1 answer
  • Assign listNodes with all elements with a clasa name prog-lang
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!