PPL Assignment
IRM2015006
boy.h
Go to the documentation of this file.
1 
4 #ifndef BOY_H
5 #define BOY_H
6 
7 #include "boy_type.h"
8 
9 #include "../girls/girl.h"
10 #include "../gifts/gift.h"
11 
12 #include <iostream>
13 #include <vector>
14 
16 class Girl;
17 class Gift;
18 
20 class Boy
21 {
22 private:
23 public:
24  std::string name;
25  int attr;
26  int intel;
27  int budget;
29  float happiness;
32  bool committed;
33  std::vector<Gift> *gifts;
35  /* /\** The default constructor *\/ */
36  /* Boy(); */
37 
38  /* /\** Parametrized constructor *\/ */
39  /* Boy(std::string name, int attr, int intel, int budget, int min_attr_req); */
40 
42  void makeCouple(Girl *girl);
43 
45  void setGiftBasket(std::vector<Gift> *gifts);
46 
48  bool isCompatible(Girl *girl);
49 
53  virtual float getHappiness() = 0;
54 
58  virtual BoyNature getNature() = 0;
59 };
60 
61 
65 bool compareOnAttractiveness (Boy *b1, Boy *b2);
66 
70 bool compareOnIntelligence (Boy *b1, Boy *b2);
71 
75 bool compareOnRichness (Boy *b1, Boy *b2);
76 
77 
78 #endif /* BOY_H */
bool committed
Definition: boy.h:32
bool compareOnIntelligence(Boy *b1, Boy *b2)
Definition: boy.cpp:3
void makeCouple(Girl *girl)
Definition: boy.cpp:18
int attr
Definition: boy.h:25
std::vector< Gift > * gifts
Definition: boy.h:33
bool isCompatible(Girl *girl)
Definition: boy.cpp:23
float happiness
Definition: boy.h:29
virtual float getHappiness()=0
int min_attr_req
Definition: boy.h:28
Definition: girl.h:18
int budget
Definition: boy.h:27
int intel
Definition: boy.h:26
virtual BoyNature getNature()=0
Definition: boy.h:20
std::string name
Definition: boy.h:24
Definition: gift.h:14
bool compareOnRichness(Boy *b1, Boy *b2)
Definition: boy.cpp:13
void setGiftBasket(std::vector< Gift > *gifts)
Definition: boy.cpp:29
Girl * girlfriend
Definition: boy.h:30
bool compareOnAttractiveness(Boy *b1, Boy *b2)
Definition: boy.cpp:8
BoyNature
Definition: boy_type.h:5