PPL Assignment
IRM2015006
Girl Class Referenceabstract

#include <girl.h>

Inheritance diagram for Girl:
Inheritance graph
Collaboration diagram for Girl:
Collaboration graph

Public Member Functions

void makeCouple (Boy *boy)
 
void setGiftBasket (std::vector< Gift > *gifts)
 
virtual float getHappiness ()=0
 
virtual GirlNature getNature ()=0
 
bool isCompatible (Boy *boy)
 

Public Attributes

bool committed
 
std::string name
 
int attr
 
int intel
 
int budget
 
float happiness
 
BoyType boy_type
 
Boyboyfriend
 
std::vector< Gift > * gifts
 

Detailed Description

Class for girl Abstract class

Definition at line 18 of file girl.h.

Member Function Documentation

virtual float Girl::getHappiness ( )
pure virtual

Find the happiness of the girl Abstract method

Implemented in ChoosyGirl, DesperateGirl, and NormalGirl.

Here is the caller graph for this function:

virtual GirlNature Girl::getNature ( )
pure virtual

Get nature of the girl Abstract method

Implemented in ChoosyGirl, DesperateGirl, and NormalGirl.

bool Girl::isCompatible ( Boy boy)

Check if the girl is compatible with the boy

Definition at line 32 of file girl.cpp.

void Girl::makeCouple ( Boy boy)

Make 'him' 'her' boyfriend

Definition at line 37 of file girl.cpp.

Here is the caller graph for this function:

void Girl::setGiftBasket ( std::vector< Gift > *  gifts)

Set giftbasket for the girl

Definition at line 42 of file girl.cpp.

Here is the caller graph for this function:

Member Data Documentation

int Girl::attr

Attractiveness of girl

Definition at line 25 of file girl.h.

BoyType Girl::boy_type

Type of boy she is seeking

Definition at line 29 of file girl.h.

Boy* Girl::boyfriend

Reference to her boyfriend

Definition at line 30 of file girl.h.

int Girl::budget

Expenses of girl

Definition at line 27 of file girl.h.

bool Girl::committed

Whether she is committed

Definition at line 23 of file girl.h.

std::vector<Gift>* Girl::gifts

The gifts girl has received

Definition at line 32 of file girl.h.

float Girl::happiness

Happiness of girl

Definition at line 28 of file girl.h.

int Girl::intel

Intelligence of girl

Definition at line 26 of file girl.h.

std::string Girl::name

Name of the girl

Definition at line 24 of file girl.h.


The documentation for this class was generated from the following files: