|
CSE 335 Project
CSE335
|
#include <Farm.h>
Public Member Functions | |
| CFarm () | |
| virtual | ~CFarm () |
| void | AddAnimal (CAnimal *cow) |
| void | DisplayInventory () |
| int | CountLegs () |
Private Attributes | |
| std::vector< CAnimal * > | mInventory |
| A list with the inventory of all animals on the farm. | |
Class that describes a farm.
Holds a collection of animals that make up the farm inventory.
| CFarm::CFarm | ( | ) |
Constructor.
|
virtual |
Destructor.
| void CFarm::AddAnimal | ( | CAnimal * | cow | ) |
Add an animal to the farm inventory.
| cow | A cow to add to the inventory |
| int CFarm::CountLegs | ( | ) |
Count the number of legs.
| void CFarm::DisplayInventory | ( | ) |
Display the farm inventory.