CSE 335 Project  CSE335
Cow.h
Go to the documentation of this file.
1 
9 #pragma once
10 
11 #include <string>
12 #include "Animal.h"
13 
17 class CCow : public CAnimal
18 {
19 public:
21  static const int NumCowLegs = 4;
22 
23  CCow();
24  virtual ~CCow();
25 
27  enum Type { Bull, BeefCow, MilkCow };
28 
29  void ObtainCowInformation();
30  void DisplayAnimal();
31 
36  virtual int NumLegs() const { return NumCowLegs; }
37 
38 private:
40  std::string mName;
41 
43  Type mType = MilkCow;
44 
46  double mMilkProduction = 0;
47 };
48 
Definition: Animal.h:14
virtual ~CCow()
Definition: Cow.cpp:23
Type
The types of cow we can have on our farm.
Definition: Cow.h:27
static const int NumCowLegs
Number of legs on a cow.
Definition: Cow.h:21
double mMilkProduction
The milk production for a cow in gallons per day.
Definition: Cow.h:46
Type mType
The type of code: Bull, BeefCow, or MilkCow.
Definition: Cow.h:43
void ObtainCowInformation()
Definition: Cow.cpp:32
std::string mName
The cow&#39;s name.
Definition: Cow.h:40
virtual int NumLegs() const
Definition: Cow.h:36
Definition: Cow.h:17
void DisplayAnimal()
Definition: Cow.cpp:107
CCow()
Definition: Cow.cpp:16