PPL Assignment
IRM2015006
girl.cpp
Go to the documentation of this file.
1 #include "girl.h"
2 
3 #include <cmath>
4 #define BASE 1.1
5 
7 {
8  return (g1->budget > g2->budget);
9 }
10 
11 // Girl::Girl()
12 // {
13 // this->committed = false;
14 // this->boyfriend = NULL;
15 // this->gifts = NULL;
16 // this->happiness = 0;
17 // }
18 
19 // Girl::Girl(std::string name, int attr, int intel, int budget, BoyType boy_type)
20 // {
21 // this->name = name;
22 // this->attr = attr;
23 // this->intel = intel;
24 // this->budget = budget;
25 // this->boy_type = boy_type;
26 // this->committed = false;
27 // this->boyfriend = NULL;
28 // this->gifts = NULL;
29 // this->happiness = 0;
30 // }
31 
33 {
34  return (boy->budget >= this->budget);
35 }
36 
38 {
39  this->boyfriend = boy;
40 }
41 
42 void Girl::setGiftBasket(std::vector<Gift> *gifts)
43 {
44  this->gifts = gifts;
45 }
bool isCompatible(Boy *boy)
Definition: girl.cpp:32
void makeCouple(Boy *boy)
Definition: girl.cpp:37
Boy * boyfriend
Definition: girl.h:30
Definition: girl.h:18
int budget
Definition: boy.h:27
Definition: boy.h:20
std::vector< Gift > * gifts
Definition: girl.h:32
bool compareOnMaintenanceCost(Girl *g1, Girl *g2)
Definition: girl.cpp:6
int budget
Definition: girl.h:27
void setGiftBasket(std::vector< Gift > *gifts)
Definition: girl.cpp:42