Main Page   Class Hierarchy   Compound List   File List   Compound Members  

GuideDog Class Reference

#include <guidedog.h>

Inheritance diagram for GuideDog:

Dog Animal List of all members.

Public Member Functions

 GuideDog ()
 GuideDog (string name, char gender, string cid, double weight, string gdid)
void setGuideDogID (string gdid)
string getGuideDogID () const
virtual void read (ifstream &fin)
virtual void print (ostream &out=cout) const
virtual ~GuideDog ()

Protected Attributes

string gdid

Detailed Description

GuideDog class, publically derived from the Dog class, for storing information about guide dogs. Such dogs have Guide Dog IDs (gdids) in addition to County IDs and weights, which they inherit from the Dog class, and names and genders, which they inherit from the Animal class.

Author:
Mark Maloof
Version:
1.0 1/27/05


Constructor & Destructor Documentation

GuideDog::GuideDog  ) 
 

Default class constructor.

GuideDog::GuideDog string  name,
char  gender,
string  cid,
double  weight,
string  gdid
 

Explicit class constructor initializing this graduate-student object using the arguments name, gender, County ID (cid), weight, and Guide-Dog ID (gdid)

Parameters:
name a string storing this guide dog's name
gender a char storing this guide dog's gender
cid a string storing this guide dog's County ID (cid)
weight a double storing this guide dog's weight
gdid a string storing this guide dog's ID

GuideDog::~GuideDog  )  [virtual]
 

Destructor. Does nothing but is recommended for classes with virtual methods.


Member Function Documentation

string GuideDog::getGuideDogID  )  const
 

Returns this guide dog's ID (gdid)

Returns:
a string storing this guide dog's ID (gdid)

void GuideDog::print ostream &  out = cout  )  const [virtual]
 

Prints this guide dog's name, gender, County ID (cid), weight, and Guide-Dog ID (gdid) to the ostream out, which defaults to cout.

Parameters:
out an ostream for printing (defaults to cout)

Reimplemented from Dog.

void GuideDog::read ifstream &  fin  )  [virtual]
 

Read's this guide dog's name, gender, County ID (cid), weight, and Guide-Dog ID (gdid) from the ifstream argument.

Parameters:
fin an ifstream for reading

Reimplemented from Dog.

void GuideDog::setGuideDogID string  gdid  ) 
 

Sets this guide dog's ID (gdid)

Parameters:
gdid a string storing this guide dog's ID (gdid)


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 16:33:09 2005 by doxygen1.3