subject

Print person1's kids, apply the IncNumKids() function, and print again, outputting text as below. End each line with newline. Sample output for below program:
Kids: 3
New baby, kids now: 4
#include
using namespace std;
class PersonInfo {
public:
void SetNumKids(int personsKids);
void IncNumKids();
int GetNumKids() const;
private:
int numKids;
};
void PersonInfo::SetNumKids(int personsKids) {
numKids = personsKids;
return;
}
void PersonInfo::IncNumKids() {
numKids = numKids + 1;
return;
}
int PersonInfo::GetNumKids() const {
return numKids;
}
int main() {
PersonInfo person1;
person1.SetNumKids(3);
//SOULTION GOES HERE//
return 0;
}

Define the missing function. licenseNum is created as: (100000 * customID) + licenseYear. Sample output:
Dog license: 77702014
#include
using namespace std;
class DogLicense{
public:
void SetYear(int yearRegistered);
void CreateLicenseNum(int customID);
int GetLicenseNum() const;
private:
int licenseYear;
int licenseNum;
};
void DogLicense::SetYear(int yearRegistered) {
licenseYear = yearRegistered;
return;
}
// FIXME: Write CreateLicenseNum()
//SOULTION GOES HERE//
int DogLicense::GetLicenseNum() const {
return licenseNum;
}
int main() {
DogLicense dog1;
dog1.SetYear(2014);
dog1.CreateLicenseNum(777);
cout << "Dog license: " << dog1.GetLicenseNum() << endl;
return 0;

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 20:50, rrrrainy
What are the advantages of google cloud ?
Answers: 2
image
Computers and Technology, 22.06.2019 08:00, wgdelgado
What is the first step in creating a maintenance ?
Answers: 2
image
Computers and Technology, 22.06.2019 18:00, ladyree8721
Which of the following physical laws can make the flow of water seem more realistic? a. motion b. gravity c. fluid dynamics d. thermodynamics
Answers: 2
image
Computers and Technology, 23.06.2019 00:00, dubouuu
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
You know the right answer?
Print person1's kids, apply the IncNumKids() function, and print again, outputting text as below. En...

Questions in other subjects: