Advertisement
cska1312

Person.h

Feb 15th, 2023
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #ifndef Person_H
  2. #define Person_H
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. class Person
  7. {
  8. public:
  9. string id;
  10. string name;
  11. string lastName;
  12. string rank;
  13. string nationality;
  14. Person(string id, string name, string lastName, string rank, string nationality);
  15. string getId()
  16. {
  17.   return id;
  18. };
  19.  
  20. string getName()
  21. {
  22.   return name;
  23. };
  24.  
  25. string getLastName()
  26. {
  27.   return lastName;
  28. }
  29. string getRank()
  30. {
  31.   return rank;
  32. }
  33.  
  34. string getNationality()
  35. {
  36.   return nationality;
  37. }
  38. void introduce()
  39. {
  40.  cout << "Mine id is: " + id  << endl << "My name is: " + name + " " + lastName <<  
  41.    + "." << endl << "Mine rank is: " + rank  << + " and I'm from " + nationality;
  42. }
  43.  
  44. };
  45.  
  46. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement