Advertisement
cska1312

Person.cpp

Feb 15th, 2023
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include "Person.h"
  4. using namespace std;
  5.  
  6. Person::Person(string id, string name, string lastName, string rank, string nationality){
  7.   this->id = id;
  8.   this->name = name;
  9.   this->lastName = lastName;
  10.   this->rank = rank;
  11.   this->nationality = nationality;
  12. }
  13.  
  14. void setId(string id)
  15. {
  16.   id = id;
  17. }
  18. void setName(string name)
  19. {
  20.   name = name;
  21. }
  22. void setLastName(string lastName)
  23. {
  24.   lastName = lastName;
  25. }
  26.  
  27. void setRank(string rank)
  28. {
  29.   rank = rank;
  30. }
  31.  
  32. void setNationality(string nationality)
  33. {
  34.   nationality = nationality;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement