Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

CSC112 Spring 2016 Examples

2370 views
1
//Declaration of the living things class
2
3
#ifndef LIVINGTHING_H
4
#define LIVINGTHING_H
5
class livingThing {
6
public:
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; }
13
protected:
14
bool alive;
15
};
16
#endif
17
18