-
Notifications
You must be signed in to change notification settings - Fork 0
/
bacteria.cpp
114 lines (92 loc) · 2.8 KB
/
bacteria.cpp
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
// Name: bacteria.cpp
// Author: Abigail Kennedy
// Date: 11/13/2020
// Desc: The cpp file for the bacteria class
#include "bacteria.h"
Bacteria::Bacteria() { // Default constructor
m_name = "Unnamed";
m_gram = false;
m_shape = "Rods";
m_acidfast = false;
m_catalase = false;
m_morphology = "Regular";
m_clusters = "Regular clusters";
m_percentage = 0;
}
Bacteria::Bacteria(string name, bool gram, string shape, bool acidfast,
bool catalase, string morphology, string clusters)
{ // Overloaded constructor
m_name = name;
m_gram = gram;
m_shape = shape;
m_acidfast = acidfast;
m_catalase = catalase;
m_morphology = morphology;
m_clusters = clusters;
m_percentage = 0;
}
Bacteria::~Bacteria(){ // Destructor
}
// Functions
string Bacteria::GetName() {
// Returns the item's name
return m_name;
}
string Bacteria::GetShape() {
// Desc: Returns the shape
return m_shape;
}
string Bacteria::GetMorphology() {
// Desc: Returns the morphology
return m_morphology;
}
string Bacteria::GetClusters() {
// Desc: Returns the cluster type
return m_clusters;
}
bool Bacteria::GetGram(){
// Desc: Returns the gram type
return m_gram;
}
bool Bacteria::GetCatalase() {
// Desc: Returns catalase status
return m_catalase;
}
bool Bacteria::GetAcidfast() {
// Desc: Returns acidfast status
return m_acidfast;
}
void Bacteria::SetName(string name) {
// Updates the name of the item
m_name = name;
}
void Bacteria::SetShape(string shape) {
// Updates the shape
m_shape = shape;
}
void Bacteria::SetMorphology(string morphology) {
// Updates the morphology
m_morphology = morphology;
}
void Bacteria::SetClusters(string clusters) {
// Updates the clusters
m_clusters = clusters;
}
void Bacteria::SetGram(bool gram) {
// Updates the gram status
m_gram = gram;
}
void Bacteria::SetCatalase(bool catalase) {
// Updates the catalase status
m_catalase = catalase;
}
void Bacteria::SetAcidfast(bool acidfast) {
// Updates the acidfast status
m_acidfast = acidfast;
}
int Bacteria::GetPercentage() {
return m_percentage;
}
void Bacteria::SetPercentage(int percentage) {
m_percentage = percentage;
}