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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:30, Twitches
This first part of the film shows the early history of motion pictures. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theatre productions? explain. in the scene where don is going to the party (starting at time code 14: 51), we see a street scene as he first rides with cosmo and then with kathy. what aspects did the filmmaker include to make the scene look and feel like don, cosmo, and kathy are riding in a car on a street? think about elements such as scenery, sound, props, lighting, and so on. a "talkie" picture is shown starting around time code 21: 15. how does the audience in the film react to the "talkie"? what influence do audiences have on film and theatre performances? how do film and theatre actors influence audiences? in the musical scene with cosmo (starting at time code 27: 00), how does the actor use props? what is the result? do you think the use of props effectively fulfilled the artistic vision for this musical number? why or why not?
Answers: 1
image
Computers and Technology, 23.06.2019 20:30, lucywood2024
What is the biggest difference between section breaks and regular page breaks
Answers: 1
image
Computers and Technology, 24.06.2019 13:10, Briannas5022
Write a program that has a conversation with the user. the program must ask for both strings and numbers as input. the program must ask for at least 4 different inputs from the user. the program must reuse at least 3 inputs in what it displays on the screen. the program must perform some form of arithmetic operation on the numbers the user inputs. turn in your .py file as well as a screenshot of your program's output. include comments in your code to explain how it works an example program run might look like (have fun with this and be creative): ‘what is your name? ’ “josh” ‘, josh. what is your favorite color? ’ “green” ‘mine too. do you also like ice cream? ’ “no” ‘josh, how old are you? ’ “40” ‘ and how many siblings do you have? ’’ “3” ‘that means you are one of 4 kid(s). is green the favorite color of anyone else in your house? ’
Answers: 3
image
Computers and Technology, 24.06.2019 13:30, iicekingmann
In the rgb model, which color is formed by combining the constituent colors? a) black b) brown c) yellow d) white e) blue
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:

Konu
English, 05.12.2021 14:00
Konu
Mathematics, 05.12.2021 14:00
Konu
History, 05.12.2021 14:00
Konu
Mathematics, 05.12.2021 14:00