#ifndef _PUPPY_H_ #define _PUPPY_H_ #include "Dog.h" typedef struct puppy_st *Puppy; // all puppies know what dogs know, and also how to sleep // Note: the toString method has been overridden struct puppy_vtable_st { void (*delete)(Dog p); void (*bark)(Dog d); char *(*toString)(Puppy p); void (*sleep)(Puppy p); }; // puppies have an extra field "numAccidents" // the number of bathroom training accidents they've had typedef struct puppy_st { struct puppy_vtable_st *vtable; char *name; int age; int numAccidents; } *Puppy; Puppy new_puppy(char *name, int age, int numAccidents); int _puppy_constructor(Puppy p, char *name, int age, int numAccidents); #endif //_PUPPY_H_