-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimal.cpp
More file actions
65 lines (61 loc) · 1.23 KB
/
Animal.cpp
File metadata and controls
65 lines (61 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* Animal.cpp
*
* Created on: Apr 11, 2020
* Author: 1305052_snhu
*/
#include "Animal.h"
Animal::Animal() {
m_name = "Default name";
m_trackNum = "0";
m_type = "Type";
m_subType = "Sub-type";
m_numEggs = 0;
m_isNursing = 0;
}
Animal::Animal(char name, int trackNum) {
m_name = name;
m_trackNum = trackNum;
m_type = "Type";
m_subType = "Sub-type";
m_numEggs = 0;
m_isNursing = 0;
}
Animal::~Animal() {
}
string Animal::GetName() {
return m_name;
}
string Animal::GetTrackNum() {
return m_trackNum;
}
string Animal::GetType() {
return m_type;
}
string Animal::GetSubType() {
return m_subType;
}
void Animal::SetName(string nameToSet) {
m_name = nameToSet;
}
void Animal::SetTrackNum(string numToSet) {
m_trackNum = numToSet;
}
void Animal::SetType(string typeToSet) {
m_type = typeToSet;
}
void Animal::SetSubType(string subTypeToSet) {
m_subType = subTypeToSet;
}
int Animal::GetNumEggs() {
return m_numEggs;
}
int Animal::GetIsNursing() {
return m_isNursing;
}
void Animal::SetIsNursing(int nursingValue) {
m_isNursing = nursingValue;
}
void Animal::SetNumEggs(int numToSet) {
m_numEggs = numToSet;
}