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#includeusing 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); this-> numkids = numkids; return 0; }2) define the missing function. licensenum is created as: (1 * customid) + licenseyear. sample output: dog license: 77702014#includeusing 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()/* your solution 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; }3) define a constructor as indicated. sample output for below program: year: 0, vin: -1year: 2009, vin: 444555666#includeusing namespace std; class carrecord { public: void setyearmade(int originalyear); void setvehicleidnum(int vehidnum); void print() const; carrecord(); private: int yearmade; int vehicleidnum; }; // fixme: write constructor, initialize year to 0, vehicle id num to -1./* your solution goes here */void carrecord: : setyearmade(int originalyear) { yearmade = originalyear; return; }void carrecord: : setvehicleidnum(int vehidnum) { vehicleidnum = vehidnum; return; }void carrecord: : print() const { cout < < "year: " < < yearmade < < ", vin: " < < vehicleidnum < < endl; return; }int main() { carrecord familycar; familycar. print(); familycar. setyearmade(2009); familycar. setvehicleidnum(444555666); familycar. print(); return 0; }4) write a second constructor as indicated. sample output: user1: minutes: 0, messages: 0user2: minutes: 1000, messages: 5000#includeusing namespace std; class phoneplan{ public: phoneplan(); phoneplan(int numminutes, int nummessages); void print() const; private: int freeminutes; int freemessages; }; phoneplan: : phoneplan() { // default constructor freeminutes = 0; freemessages = 0; return; }// fixme: create a second constructor with numminutes and nummessages parameters./* your solution goes here */void phoneplan: : print() const { cout < < "minutes: " < < freeminutes < < ", messages: " < < freemessages < < endl; return; }int main() { phoneplan user1plan; // calls default constructor phoneplan user2plan(1000, 5000); // calls newly-created constructor cout < < "user1: "; user1plan. print(); cout < < "user2: "; user2plan. print(); return 0; }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
What do the principles of notice, choice, onward transfer, and access closely apply to? a. privacyb. identificationc. retentiond. classification
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Acloud service provider uses the internet to deliver a computing environment for developing, running, and managing software applications. which cloud service model does the provider offer? a. iaas b. caas c. maas d. paas e. saas
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
How are stop motion special effects in animated films created
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Does read theory have answers keys ?
Answers: 1
You know the right answer?
Print person1's kids, apply the incnumkids() function, and print again, outputting text as below. en...
Questions
question
Mathematics, 23.08.2020 02:01
Questions on the website: 13722367