Advertisement
Guest User

PatientCPP

a guest
Nov 6th, 2015
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.83 KB | None | 0 0
  1. #include <iostream>
  2. #include "date.h"
  3. #include "PatientRecord.h"
  4.  
  5. using namespace std;
  6.  
  7. //Patient Constructor
  8. Patient::Patient(int id, const string fn, string ln, Date bDay){
  9.     setID(id);
  10.     setFirstName(fn);
  11.     setLastName(ln);
  12.     setBirthDate(bDay);
  13.  
  14. }
  15.  
  16. //Patient::~Patient(){}
  17.  
  18. Patient& Patient::setID(int x)
  19. {
  20.     ID = x;
  21.     return *this;
  22. }
  23.  
  24. Patient& Patient::setFirstName(string fn)
  25. {
  26.     firstName = fn;
  27.     return *this;
  28. }
  29.  
  30. Patient& Patient::setLastName(string ln)
  31. {
  32.     lastName = ln;
  33.     return *this;
  34. }
  35.  
  36.  
  37. Patient& Patient::setBirthDate(Date bday)
  38. {
  39.     birthdate = bday;
  40.  
  41.     return *this;
  42. }
  43.  
  44. int Patient::getID()
  45. {
  46.     return ID;
  47. }
  48.  
  49. const string Patient::getFirstName()
  50. {
  51.     return firstName;
  52. }
  53.  
  54. const string Patient::getLastName()
  55. {
  56.     return lastName;
  57. }
  58.  
  59. Date Patient::getBirthDate()
  60. {
  61.     return birthdate;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement