forked from CS162-Group35/GroupProject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tool.cpp
75 lines (68 loc) · 2.29 KB
/
tool.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
/******************************************************************************
* Authors: Sean Patrick Akins
* Edmund Dea
* Trevor Rollins
* Nathan Villegas
* Group: 35
* Class: CS162-400
* Date: 10/27/2017
* Title: Group Project
* Description: Defines the Tool class
******************************************************************************/
#include "tool.hpp"
/******************************************************************************
* Function: Tool
* Arguments: N/A
* Description: Default constructor for the Tool class
******************************************************************************/
Tool::Tool()
{
strength = 1;
type = ' '; //what should we use as default?
}
/******************************************************************************
* Function: Tool
* Arguments: N/A
* Description: Overloaded constructor for the Tool class
******************************************************************************/
Tool::Tool(int tempStrength, char tempType)
{
strength = tempStrength;
type = tempType;
}
/******************************************************************************
* Function: getStrength
* Arguments: N/A
* Description: Get function for strength
******************************************************************************/
int Tool::getStrength() const
{
return strength;
}
/******************************************************************************
* Function: getType
* Arguments: N/A
* Description: Get function for type
******************************************************************************/
char Tool::getType() const
{
return type;
}
/******************************************************************************
* Function: setStrength
* Arguments: int tempType
* Description: Set function for int type
******************************************************************************/
void Tool::setStrength(int tempType)
{
type = tempType * 2;
}
/******************************************************************************
* Function: setType
* Arguments: char tempType
* Description: Set function for char type
******************************************************************************/
void Tool::setType(char tempType)
{
type = tempType;
}