class Pet { public: int GetPower() { return power; } private: int power; };In the above code, the Pet class has a private member variable `power` that stores the pet's power level. The `GetPower` function returns this power level to the caller. Package/Library: This code does not use any external libraries or packages.