#include <animal.h>
Inheritance diagram for Animal:

Public Member Functions | |
| Animal () | |
| Animal (string name, char gender) | |
| void | setName (string name) |
| void | setGender (char gender) |
| string | getName () const |
| char | getGender () const |
| virtual void | print (ostream &out=cout) const |
| virtual void | read (ifstream &fin) |
| virtual | ~Animal () |
Protected Attributes | |
| string | name |
| char | gender |
|
|
Default constructor. |
|
||||||||||||
|
Explicit class constructor initializing a animal object using the arguments name and gender.
|
|
|
Destructor. Does nothing but is recommended for classes with virtual methods. |
|
|
Returns this animal's gender
|
|
|
Returns this animal's name
|
|
|
Prints this animal's name and gender to the ostream out, which defaults to cout.
|
|
|
Reads this animal's name and gender from the ifstream argument, storing them in the respective data members.
|
|
|
Sets this animal's gender
|
|
|
Sets this animal's name
|
1.3