#include <string>
#include <iostream>
using namespace std;
class Cat{
private :
string m_name;
string m_owner;
int m_price;
string m_color;
double m_weight;
void sellCat(string whoBought,int price);
public :
Cat(); //this is the default constructor notice no arguments
Cat(const string name , const string color, int price, double weight, const string owner);
void changeColor(string newColor);
void setName(string name);
void showCat();
};
Cat::Cat(const string name , const string color, int price = 0 , double weight = 0, const string owner = "NotSoldYet"){
m_name = name;
m_owner = owner;
m_color = color;
m_price = price ;
m_weight = weight;
}
void Cat::showCat()
{
cout << "Name is " << m_name << endl << "Owner is " << m_owner;
}
int main()
{
Cat newCat("Garfield","Green");
newCat.showCat();
}
I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCgpjbGFzcyBDYXR7CiAgICBwcml2YXRlIDoKICAgICAgICBzdHJpbmcgbV9uYW1lOwogICAgICAgIHN0cmluZyBtX293bmVyOwogICAgICAgIGludCBtX3ByaWNlOwogICAgICAgIHN0cmluZyBtX2NvbG9yOwogICAgICAgIGRvdWJsZSBtX3dlaWdodDsKICAgICAgICB2b2lkIHNlbGxDYXQoc3RyaW5nIHdob0JvdWdodCxpbnQgcHJpY2UpOwogICAgcHVibGljIDoKICAgICAgICBDYXQoKTsgLy90aGlzIGlzIHRoZSBkZWZhdWx0IGNvbnN0cnVjdG9yIG5vdGljZSBubyBhcmd1bWVudHMKICAgICAgICBDYXQoY29uc3Qgc3RyaW5nIG5hbWUgLCBjb25zdCBzdHJpbmcgY29sb3IsIGludCBwcmljZSwgZG91YmxlIHdlaWdodCwgY29uc3Qgc3RyaW5nIG93bmVyKTsKICAgICAgICB2b2lkIGNoYW5nZUNvbG9yKHN0cmluZyBuZXdDb2xvcik7CiAgICAgICAgdm9pZCBzZXROYW1lKHN0cmluZyBuYW1lKTsKICAgICAgICB2b2lkIHNob3dDYXQoKTsKfTsKCgpDYXQ6OkNhdChjb25zdCBzdHJpbmcgbmFtZSAsIGNvbnN0IHN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