25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.0 KiB

  1. /*
  2. * Written by : BinHong Lee
  3. * Last edited : 5/11/2016
  4. */
  5. #include <string>
  6. #include "Person.hpp"
  7. using namespace std;
  8. //Empty constructor
  9. Person::Person()
  10. {
  11. }
  12. //Complete comstructor
  13. Person::Person(string name, string password, string email, string phoneNo)
  14. {
  15. this->name = name;
  16. this->password = password;
  17. this->email = email;
  18. this->phoneNo = phoneNo;
  19. }
  20. //Getters and setters
  21. void Person::setName(string name)
  22. {
  23. this->name = name;
  24. }
  25. string Person::getName()
  26. {
  27. return name;
  28. }
  29. void Person::setEmail(string email)
  30. {
  31. this->email = email;
  32. }
  33. string Person::getEmail()
  34. {
  35. return email;
  36. }
  37. void Person::setPhoneNo(string phoneNo)
  38. {
  39. this->phoneNo = phoneNo;
  40. }
  41. string Person::getPhoneNo()
  42. {
  43. return phoneNo;
  44. }
  45. void Person::setPassword(string password)
  46. {
  47. this->password = password;
  48. }
  49. string Person::getPassword()
  50. {
  51. return password;
  52. }
  53. //"password" do not have getter but only a checker instead
  54. bool Person::checkPassword(string password)
  55. {
  56. return (this->password == password);
  57. }
  58. int Person::getId()
  59. {
  60. return id;
  61. }