#include <dogs.h>
Public Member Functions | |
Dogs () | |
Dogs (string filename) | |
void | print (ostream &out=cout) |
bool | read (string filename) |
double | getTotalWeight () |
~Dogs () |
|
Default class constructor. |
|
Explicit class constructor initializing this dogs class using the information in the file filename.
|
|
Class destructor. |
|
Returns the total weight of the dogs stored in the vector.
|
|
Prints to the ostream out this object's dogs, their names, gender, County ID, weights, and, for guide dogs, their Guide-Dog ID. The ostream defaults to cout.
|
|
Reads dogs from the file named filename and stores them in a vector. Guide dogs are marked with a 'G', and all other dogs are marked with a 'D'. If the file is opened successfully, then the method returns true; otherwise, it returns false;
|