#include <iostream>
using namespace std;
class Cat // begin declaration of the class
{
public: // begin public section
int GetAge(); // accessor function
void SetAge (int age); // accessor function
void Meow(); // general function
private: // begin private section
int itsAge; // member variable
};
int Cat::GetAge()
{
return itsAge;
}
void Cat::SetAge(int age)
{
itsAge = age;
}
void Cat::Meow()
{
cout << "Meow.\n";
}
int main()
{
Cat Frisky;
Frisky.SetAge(5);
Frisky.Meow();
cout << "Frisky is a cat who is " ;
cout << Frisky.GetAge() << " years old.\n";
Frisky.Meow();
return 0;
}