-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContestant.h
114 lines (109 loc) · 6.04 KB
/
Contestant.h
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
114
#ifndef CONTESTANT_H_INCLUDED
#define CONTESTANT_H_INCLUDED
//************************************************************************
// Class name: Contestant
// Description: This class is in charge of holding each contestant's
// attributes
// Authors: Naelin Aquino, Miriam Flores, Bianca Hernandez
// Last modified: 05-15-15
//************************************************************************
#include <string>
using namespace std;
class Contestant
{
private:
int wager,
id,
col,
row;
string contestant_answer;
public:
// Constructors
//***********************************************************************************************************
Contestant();
// Summary: The constructor that initializes the contestant
// Preconditions: ---
// Postconditions: contestant is initialized
//
//***********************************************************************************************************
//***********************************************************************************************************
Contestant(int id);
// Description: overloaded constructor
// PreCondition:
// PostCondition: sets values to themselves
//
//***********************************************************************************************************
// Accessor Methods
//***********************************************************************************************************
int getWager()const {return wager;}
// Summary: it returns the variable wager
// Preconditions: wager is greater than 0 && less than score
// Postconditions: wager is returned
//
//***********************************************************************************************************
//***********************************************************************************************************
int getId()const {return id;}
// Summary: returns the variable id
// Preconditions: id > 0 && id < 4
// Postconditions: id is return with it's value
//
//***********************************************************************************************************
//***********************************************************************************************************
int getRow()const {return row;}
// Summary: returns the value of the variable row
// Preconditions: row > 0 && row < 6
// Postconditions: the value of row is returned
//
//***********************************************************************************************************
//***********************************************************************************************************
int getCol()const {return col;}
// Summary: returns the value of the variable col
// Preconditions: col >= 0 && col < 5
// Postconditions: the value of col is returned
//
//***********************************************************************************************************
//***********************************************************************************************************
string getContestantAnswer() const {return contestant_answer;}
// Summary: returns the value contestant_answer
// Postconditions: contestant answer != " "
// Preconditions: the contestant value is returned
//
//***********************************************************************************************************
// Mutator Methods
//***********************************************************************************************************
void setRow(int row);
// Summary: sets the integer value into the variable row
// PreCondition: row > 0 && row < 6
// PostCondition: an integer value is assigned in the variable row
//
//***********************************************************************************************************
//***********************************************************************************************************
void setCol(int col);
// Summary: sets the integer value into the variable col
// PreCondition: col >=0 && col < 5
// PostCondition: an integer value is assigned in the variable col
//
//***********************************************************************************************************
//***********************************************************************************************************
void setWager(int wager);
// Summary: it sets and integer value into the variable wager
// PostCondition: wager >= 0 && wager < contestant score
// PreCondition: an integer value is assigned to the variable wager
//
//***********************************************************************************************************
//***********************************************************************************************************
void setId(int id);
// Summary: it sets the integer value between 1-3 into the variable id
// Postconditions: id > 0 && id < 4
// Preconditions: the integer value is assigned to the variable id
//
//***********************************************************************************************************
//***********************************************************************************************************
void setContestantAnswer(string contestant_answer);
// Summary: is sets a string to the variable contestant_answer
// Postconditions: contestant_answer != " "
// Preconditions: the string input is assigned to the variable contestant_answer
//
//***********************************************************************************************************
};
#endif // CONTESTANT_H_INCLUDED