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, 22.06.2019 20:00
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
question
Computers and Technology, 24.06.2019 07:50
Write a defining table and then a program that determines if you can sleep in or not. your program should get all its input from your computer’s clock. on all weekdays (monday through friday) that are not holidays, your program should output “get up! ” on all other days (weekends and holidays), your program should output “sleep in.” the three holidays that your program must check for are january 1 (new year’s day), july 4 (u.s. independence day), and december 25 (christmas). you don’t need to include other holidays in your program because most other holidays do not occur on a fixed day each year.
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Refer to the figure and match the theorem that supports the statement.1.if chords are =, then arcs are =.if bc = de, then arc bc = arc de2.if arcs are =, then chords are =.if arc bc = arc de, then bc = de3.diameters perpen
Answers: 3
You know the right answer?
Print person1's kids, apply the incnumkids() function, and print again, outputting text as below. en...
Questions
question
Mathematics, 05.10.2020 01:01
question
Social Studies, 05.10.2020 01:01
question
Mathematics, 05.10.2020 01:01
question
Mathematics, 05.10.2020 01:01
Questions on the website: 13722363