class Gettable { public: explicit Gettable(int attribute); Gettable &setAttribute(int attribute); int attribute() const; private: int _attribute; }; Gettable::Gettable(int attribute): _attribute(attribute) { } Gettable &Gettable::setAttribute(int attribute) { _attribute = attribute; return *this; } int Gettable::attribute() const { return _attribute; }