-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUser.h
More file actions
37 lines (34 loc) · 835 Bytes
/
Copy pathUser.h
File metadata and controls
37 lines (34 loc) · 835 Bytes
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
#pragma once
class User
{ //need to add activity level to calculation
private:
float maxCarbs;
float maxProt;
float maxFat;
float currCarb;
float currProt;
float currFat;
int age;
int activityLevel;
float weight;
float height;
float BMR;
public:
float calculateBMR(int AGE, int actLev, float WEIGHT, float HEIGHT);
float giveMaxCarb();
float giveMaxProt();
float giveMaxFat();
User(int AGE, int actLev, float WEIGHT, float HEIGHT) {
this->age = AGE;
this->activityLevel = actLev;
this->weight = WEIGHT;
this->height = HEIGHT;
this->BMR = calculateBMR(this->age, this->activityLevel, this->weight, this->height);
this->currCarb = 0.0f;
this->currProt = 0.0f;
this->currFat = 0.0f;
this->maxCarbs = (this->BMR) * 0.4f;
this->maxProt = (this->BMR) * 0.4f;
this->maxFat = (this->BMR) * 0.2f;
}
};