00001 #ifndef PET_H
00002 #define PET_H
00003
00004 #include <iostream>
00005 #include <fstream>
00006 #include <string>
00007 #include <stdexcept>
00008
00009 using namespace std;
00010
00019 class Pet
00020 {
00021 public:
00022 Pet();
00023 Pet( string name, double age ) throw ( out_of_range );
00024 void setName( string name );
00025 void setAge( double age ) throw ( out_of_range );
00026 string getName() const;
00027 double getAge() const;
00028 virtual void print( ostream &out = cout ) const;
00029 virtual void read( istream &in ) throw ( out_of_range );
00030 virtual ~Pet();
00031
00032 protected:
00033 string name;
00034 double age;
00035
00036 };
00037
00038 #endif // PET_H
00039