PPL Assignment
IRM2015006
|
#include <generousboy.h>
Public Member Functions | |
GenerousBoy (std::string name, int attr, int intel, int budget, int min_attr_req) | |
float | getHappiness () override |
BoyNature | getNature () override |
![]() | |
void | makeCouple (Girl *girl) |
void | setGiftBasket (std::vector< Gift > *gifts) |
bool | isCompatible (Girl *girl) |
Static Private Attributes | |
static const BoyNature | nature = generous |
Additional Inherited Members | |
![]() | |
std::string | name |
int | attr |
int | intel |
int | budget |
int | min_attr_req |
float | happiness |
Girl * | girlfriend |
bool | committed |
std::vector< Gift > * | gifts |
Header file for generous boy GenerousBoy class Inherits Boy publicly
Definition at line 10 of file generousboy.h.
GenerousBoy::GenerousBoy | ( | std::string | name, |
int | attr, | ||
int | intel, | ||
int | budget, | ||
int | min_attr_req | ||
) |
Parametrized constructor
Definition at line 3 of file generousboy.cpp.
|
overridevirtual |
overriding getHappiness of base class
Implements Boy.
Definition at line 15 of file generousboy.cpp.
|
overridevirtual |
overriding getNature of base class
Implements Boy.
Definition at line 26 of file generousboy.cpp.
Nature of boy
Definition at line 12 of file generousboy.h.