Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

CSC112 Spring 2016 Examples

2370 views
1
// The mammal class!
2
3
#ifndef MAMMAL_H
4
#define MAMMAL_H
5
#include "animal.h"
6
#include <string>
7
8
class mammal : public animal
9
{
10
public:
11
virtual mammal *liveBirth() = 0;
12
13
//hair functions
14
virtual void setHairColor(std::string &color);
15
virtual std::string getHairColor();
16
virtual void setHairLength(double length);
17
virtual double getHairLength();
18
19
protected:
20
std::string hairColor;
21
double hairLength;
22
};
23
24
#endif
25
26