Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. class animal{
  2.  
  3.  
  4. private:
  5.  
  6. string name;
  7. int age;
  8. double speed;
  9.  
  10.  
  11. public:
  12. string family;
  13.  
  14.  
  15.  
  16. void SetAttributes(int age, string name, double speed, string family)
  17. { this.age = k;
  18. this.name = name;
  19. this.speed = speed;
  20. this.family = family;
  21.  
  22. }
  23.  
  24. string getAttributes()
  25. {
  26. cout>>age;
  27. cout>>name;
  28. cout>>speed;
  29.  
  30. cout>>family;
  31. return family;
  32.  
  33. }
  34.  
  35. void animal()
  36. {
  37. this.name = "Undefined";
  38. this.age = 0;
  39. this.speed = 0.0;
  40. this.family = "Undefined";
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement