CSE 335 Project  CSE335
CFarm Class Reference

#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.
 

Detailed Description

Class that describes a farm.

Holds a collection of animals that make up the farm inventory.

Constructor & Destructor Documentation

CFarm::CFarm ( )

Constructor.

CFarm::~CFarm ( )
virtual

Destructor.

Member Function Documentation

void CFarm::AddAnimal ( CAnimal cow)

Add an animal to the farm inventory.

Parameters
cowA cow to add to the inventory
int CFarm::CountLegs ( )

Count the number of legs.

Returns
Number of legs on the farm.
void CFarm::DisplayInventory ( )

Display the farm inventory.


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