Inheritance can be complex. Let's start with the simplest of 'em all -- behavior inheritance. Here you are inheriting behavior only and no state. E.g: Both Person and Animal are Animate objects which exhibit an IsAlive behavior. To use your example:
class LivingThing {
/* We propose a new type */
public:
virtual bool IsAlive() = 0;
virtual void Birth() = 0;
virtual void Death() = 0;
};
class Person : public LivingThing {
/* A real living thing */
public:
virtual bool IsAlive() { return true; }
virtual void Birth() {}
virtual void Death() {}
/* .. and has some special behavior */
void Marry();
void Divorce();
};
class Animal: public LivingThing {
/* A real living thing */
public:
virtual bool IsAlive() { return true; }
virtual void Birth() {}
virtual void Death() {}
/* .. and has some special behavior */
void Bite();
void Bark();
};
I wrote this using C++ syntax, if you have problems understanding any of it, just say so!