subject

Write a class "Dog" with a private int field called months and two public member functions setAge and GetStage. setAge takes as argument monthsToSet and sets the member field months. setAge returns void. getStage is a const member function that takes no argument and returns a string "Puppy" if the dog is less than 9 months old, "Adolescence" if more than 9 and less than 13 months, "Adulthood" if more than 13 and less than 60 months and "Senior" otherwise. The main should create a Dog called Buddy, set its age to 14 and cout the string returned by GetStage.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:30
Felicia wants to become a head surgeon by december 2013. she designs the career milestones that she would need to complete her goal. by june 2013, she was not licensed. which best describes what she should do?
Answers: 2
question
Computers and Technology, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
You know the right answer?
Write a class "Dog" with a private int field called months and two public member functions setAge an...
Questions
question
Mathematics, 15.12.2020 20:10
question
Mathematics, 15.12.2020 20:10
question
Mathematics, 15.12.2020 20:10
Questions on the website: 13722363