SHARE
TWEET

Untitled

a guest Sep 16th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. //  PersonModel.cpp
  3. //  lekcjav2
  4. //
  5. //  Created by Komputer on 16/09/2019.
  6. //  Copyright © 2019 Friq. All rights reserved.
  7. #include "PersonModel.hpp"
  8.  
  9. Person::Person()
  10. {
  11.     Person::firstName = "";
  12.     Person::lastName = "";
  13.     Person::yearOfBirth = 0;
  14. }
  15.  
  16. Person::Person(string fName, string lName, int yob)
  17. {
  18.     Person::firstName = fName;
  19.     Person::lastName = lName;
  20.     Person::yearOfBirth = yob;
  21. }
  22.  
  23. void Person::setFirstName(string fName)
  24. {
  25.     Person::firstName = fName;
  26. }
  27. string Person::getFirstName()
  28. {
  29.     return Person::firstName;
  30. }
  31. void Person::setLastName(string lName)
  32. {
  33.     Person::lastName = lName;
  34. }
  35. string Person::getLastName()
  36. {
  37.     return Person::lastName;
  38. }
  39. void Person::setYearOfBirth(int birth)
  40. {
  41.     Person::yearOfBirth= birth;
  42. }
  43. int Person::getYearOfBirth()
  44. {
  45.     return Person::yearOfBirth;
  46. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top