Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class animal{
- private:
- string name;
- int age;
- double speed;
- public:
- string family;
- void SetAttributes(int age, string name, double speed, string family)
- { this.age = k;
- this.name = name;
- this.speed = speed;
- this.family = family;
- }
- string getAttributes()
- {
- cout>>age;
- cout>>name;
- cout>>speed;
- cout>>family;
- return family;
- }
- void animal()
- {
- this.name = "Undefined";
- this.age = 0;
- this.speed = 0.0;
- this.family = "Undefined";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement