CSC112 Spring 2016 Examples
1//Declaration of the living things class 2 3#ifndef LIVINGTHING_H 4#define LIVINGTHING_H 5class livingThing { 6public: 7 virtual void grow()=0; 8 virtual void die()=0; 9 virtual void print()=0; 10 11 livingThing() { alive=true; } 12 virtual bool isAlive() { return alive; } 13protected: 14 bool alive; 15}; 16#endif 17 18