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
ehidna [41]
3 years ago
12

Print person1's kids, apply the IncNumKids() function, and print again, outputting text as below. End each line with a newline.

Computers and Technology
1 answer:
padilas [110]3 years ago
7 0

Answer:

// Program in C++

#include <iostream>

using namespace std;

class PersonInfo {

  private:

     int numKids;

  public:

     void setNumKids(int personsKids) {

        numKids = personsKids;

        return;

     }

     void incNumKids() {

        numKids = numKids + 1;

        return;

     }

     int getNumKids() {

        return numKids;

     }

};

int main() {

  PersonInfo person1;

  person1.setNumKids(3);

  cout << "Kids: " << person1.getNumKids() << endl;

  person1.incNumKids();

  cout << "New baby, kids now: " << person1.getNumKids() << endl;

  return 0;

}

Explanation:

  • Inside the main function, create an object of the PersonInfo class.
  • Call the setNumKids method with the help of person1 object and pass 3 as an argument.
  • Display the current number of kids using the getNumKids method.
  • Increment the number of kids by calling the incNumKids method.
  • Finally print the updated number of kids by calling the getNumKids method again.

Output:

Kids: 3

New baby, kids now: 4

You might be interested in
An engine you're servicing has electronically controlled cooling fans. Cooling fan 1 doesn't work but cooling fan 2 does. Which
Elanso [62]

It might because of many reasons:

  • Fan 1 is not connected to the Program (via Bluetooth, WIFI, or wired)
  • The code made to make Fan 1 start up has a bug or an error
  • Fan 1 has a hardware problem
  • Fan 1 is out of reach for the electronically controller to reach
  • Fan 1 is not connected to a power supply (tho)

<u><em>sorry if my answers don't help solve your problem </em></u>

4 0
4 years ago
Which word processing file that contains text and other
Oksi-84 [34.3K]

Answer:

B . document

Explanation:

Word document contains text, table, picture and more. Word document is a file of .doc, .docx etc format

Table, ribbon or keyboard can't be classed as a file and they are elements of a file, menu or hardware

<u>So correct option is</u> B. Document

7 0
3 years ago
Read 2 more answers
What name is given to the assurance that requested information is available to authorized users upon request
mrs_skeptik [129]

Answer:

Availability

Explanation:

With Data availability, it means that we are saying that information is accessible to users. This gives the assurance of the system and also the data being accessible to authenticated users anytime they have the need for it.

It is simply saying that information would be operable by users with authorization whenever they request to.

5 0
3 years ago
after you enter the details for the first selected recipient in the new address list dialogue box click what tab to add another
agasfer [191]
I need answer choices
4 0
4 years ago
Read 2 more answers
REALLY IMPORTANT QUESTION
larisa [96]

1:Google

2:Cortana

3:Alexa

4:Siri

8 0
3 years ago
Read 2 more answers
Other questions:
  • What is a programming language?
    11·2 answers
  • You have just connected a new computer to your network. The network user static IP addressing. You find that the computer can co
    12·2 answers
  • The proxy statement issued by a corporation is a requirement of: a. The Securities &amp; Exchange Commission (SEC) b. The Financ
    5·1 answer
  • Given storeMonthlySales NUM STOREST[NUM MONTHST[NUM DEPTS] is a three-dimensional array of floating point values. Write a C++ fu
    5·1 answer
  • What are procedures that help keep a data base current
    7·2 answers
  • Create an application (that uses the SortedABList) that allows a user to enter a list of countries that he or she has visited an
    11·1 answer
  • The D:\ drive in your computer has been formatted with NTFS. The Mary user account has been assigned the following permissions:
    10·1 answer
  • Does anyone know edhesive 4.3 question 1
    11·2 answers
  • FIRST TO Answer for free brainlest. GOG GOGOGO
    6·1 answer
  • What is uncopyrighted software that is given away without cost
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!