-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHealthProfile.cpp
More file actions
82 lines (66 loc) · 1.87 KB
/
HealthProfile.cpp
File metadata and controls
82 lines (66 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Class implementation for HealthProfile class
#include <string>
#include "Date.h"
#include "HeartRates.h"
#include "HealthProfile.h"
using namespace std;
HealthProfile::HealthProfile(string givenFirstName, string givenLastname,
char givenGender, Date givenDateOfBirth, int givenHeight, int givenWeight){
// TODO: Figure out why default constructor for HeartRates is needed for this
setFirstName(givenFirstName);
setLastName(givenLastname);
setGender(givenGender);
setDateOfBirth(givenDateOfBirth);
setHeight(givenHeight);
setWeight(givenWeight);
// No need to initialize names, they will never be used here
heartRates.setDateOfBirth(givenDateOfBirth);
}
// get function for firstName
string HealthProfile::getFirstName(){
return firstName;
}
// set function for firstName
void HealthProfile::setFirstName(string givenFirstName){
firstName = givenFirstName;
}
// get function for lastName
string HealthProfile::getLastName(){
return lastName;
}
// set function for lastName
void HealthProfile::setLastName(string givenLastName){
lastName = givenLastName;
}
// get function for gender
char HealthProfile::getGender(){
return gender;
}
// set function for gender
void HealthProfile::setGender(char givenGender){
gender = givenGender;
}
// get function for dateOfBirth
Date HealthProfile::getDateOfBirth(){
return dateOfBirth;
}
// set function for dateOfBirth
void HealthProfile::setDateOfBirth(Date givenDateOfBirth){
dateOfBirth = givenDateOfBirth;
}
// get function for height
int HealthProfile::getHeight(){
return height;
}
// set function for height
void HealthProfile::setHeight(int givenHeight){
height = givenHeight;
}
// get function for weight
int HealthProfile::getWeight(){
return weight;
}
// set function for weight
void HealthProfile::setWeight(int givenWeight){
weight = givenWeight;
}