Answer:
see explaination
Step-by-step explanation:
#include <iostream>
using namespace std;
class Dog {
int months;
public:
void SetAge(int mnths);
string GetStage() const;
//FIXME: Add declarations of member functions and fields
};
//FIXME: Add definitions of member functions
void Dog::SetAge(int mnths)
{
months = mnths;
}
string Dog::GetStage() const
{
if(months<9)
return string("Puppy");
else if(months<13)
return string("Adolescence");
else if(months<60)
return string("Adulthood");
else
return string("Senior");
}
int main() {
Dog buddy;
buddy.SetAge(14);
cout << buddy.GetStage();
return 0;
}
See attachment for screenshot and output.