-
Notifications
You must be signed in to change notification settings - Fork 1
/
object.cpp
68 lines (59 loc) · 972 Bytes
/
object.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
/*
Author: Justin Muskopf
Instructor: Hoffman
Course: CSCE 4550, Fall 2018
Assignment: Project 1
*/
#include "object.h"
/*
Brief: Initializes an Object
*/
Object::Object()
{
value = 0;
}
/*
Brief: Initializes an Object with its name and lvl
Parameters: std::string _name - The name, SecurityLevel _lvl - The security level
*/
Object::Object(std::string _name, SecurityLevel _lvl)
{
name = _name;
lvl = _lvl;
Object();
}
/*
Brief: Get the object's name
*/
std::string Object::getName()
{
return name;
}
/*
Brief: Get the object's security level
*/
SecurityLevel Object::getSecurityLevel()
{
return lvl;
}
/*
Brief: Set the object's value
Parameters: int _value - The object's new value
*/
void Object::setValue(int _value)
{
value = _value;
}
/*
Brief: Get the object's name
*/
int Object::getValue()
{
return value;
}
/*
Brief: Get the object's name
*/
Object::~Object()
{
}