Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

CSC112 Spring 2016 Examples

2370 views
1
//the cat class
2
3
#ifndef CAT_H
4
#define CAT_H
5
#include "mammal.h"
6
7
class cat : public mammal {
8
public:
9
cat(); //cat constructor
10
11
virtual void grow();
12
virtual void die();
13
virtual mammal *liveBirth();
14
virtual void print();
15
16
//TODO Add more cat-like behaviors
17
protected:
18
19
double lives;
20
};
21
22
#endif
23
24