CSE 335 Project  CSE335
CCow Class Reference

#include <Cow.h>

Inherits CAnimal.

Public Types

enum  Type { Bull, BeefCow, MilkCow }
 The types of cow we can have on our farm.
 

Public Member Functions

 CCow ()
 
virtual ~CCow ()
 
void ObtainCowInformation ()
 
void DisplayAnimal ()
 
virtual int NumLegs () const
 
- Public Member Functions inherited from CAnimal
 CAnimal ()
 
virtual ~CAnimal ()
 

Static Public Attributes

static const int NumCowLegs = 4
 Number of legs on a cow.
 

Private Attributes

std::string mName
 The cow's name.
 
Type mType = MilkCow
 The type of code: Bull, BeefCow, or MilkCow.
 
double mMilkProduction = 0
 The milk production for a cow in gallons per day.
 

Detailed Description

Describes a single cow.

Constructor & Destructor Documentation

CCow::CCow ( )

Constructor.

CCow::~CCow ( )
virtual

Destructor.

Member Function Documentation

void CCow::DisplayAnimal ( )
virtual

Display information about this cow.

Reimplemented from CAnimal.

virtual int CCow::NumLegs ( ) const
inlinevirtual

How many legs does this animal have?

Returns
Number of legs (4 for cows)

Reimplemented from CAnimal.

void CCow::ObtainCowInformation ( )

Obtain information from the user about this cow.

Asks the user for the information that describes a cow.


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