-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudent.cpp
More file actions
83 lines (70 loc) · 1.69 KB
/
Copy pathStudent.cpp
File metadata and controls
83 lines (70 loc) · 1.69 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
Derek Norman
2364922
norman@chapman.edu
CPSC-350-03
Assignment 5
*/
/*
* Student class, a simple representation of student waiting to meet with a teacher/advisor
*/
#include "Student.h"
Student::Student(){ //constructor
waitTime = 0;
timeNeeded = 0;
timeArrived = 0;
}
Student::Student(int ta, int tn){ //overloaded constructor
waitTime = 0;
timeNeeded = tn;
timeArrived = ta;
}
Student::~Student(){ //destructor
}
/*
* Method getWaitTime, returns the wait time of the student
* Method returns an int representing the wait time of the student
*/
int Student::getWaitTime(){
return waitTime;
}
/*
* Method updateWaitTime, increments the waitTime for the student
*/
void Student::updateWaitTime(){
waitTime++;
}
/*
* Method setWaitTime, sets the waitTime for the student
* Method has single paramter t representating the wait time of the student
*/
void Student::setWaitTime(int t){
waitTime = t;
}
/*
* Method getTimeNeeded, returns the amount of time the student needs for the meeting
* Returns an int representing the time the student needs for the meeting
*/
int Student::getTimeNeeded(){
return timeNeeded;
}
/*
* Method setTimeNeeded, sets the time the student needs for the meeting
* Method takes a single parameter t representing the time the student needs for the meeting
*/
void Student::setTimeNeeded(int t){
timeNeeded = t;
}
/*
* Method updateTimeNeeded, deincrements the time the student needs for the meeting
*/
void Student::updateTimeNeeded(){
timeNeeded--;
}
/*
* Method getTimeArrived, returns the time the student arrived
* Returns an int representing the time the student arrived
*/
int Student::getTimeArrived(){
return timeArrived;
}