-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstudent.cpp
102 lines (72 loc) · 1.27 KB
/
student.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
#include <iostream>
#include "student.h"
#include <string>
using namespace std;
//Definitions of getters or accessors from section D2.A
string Student::getSID()
{
return studentID;
}
string Student::getFN()
{
return firstName;
}
string Student::getLN()
{
return lastName;
}
string Student::getEMA()
{
return emailAddress;
}
int Student::getSA()
{
return age;
}
int* Student::getDIC()
{
return daysInCourse;
}
//Definitions of setters for mutators from section D2.A
void Student::setSID(string SID)
{
studentID = SID;
}
void Student::setFN(string FN)
{
firstName = FN;
}
void Student::setLN(string LN)
{
lastName = LN;
}
void Student::setEMA(string EMA)
{
emailAddress = EMA;
}
void Student::setSA(int SA)
{
age = SA;
}
void Student::setDIC(int *DIC)
{
daysInCourse[0] = DIC[0];
daysInCourse[1] = DIC[1];
daysInCourse[2] = DIC[2];
}
//Definition of the constructor that uses all elements of the table for section D2.C
Student::Student(string SID, string FN, string LN, string EMA, int SA, int* DIC, Degree DEG)
{
studentID = SID;
firstName = FN;
lastName = LN;
emailAddress = EMA;
age = SA;
daysInCourse[0] = DIC[0];
daysInCourse[1] = DIC[1];
daysInCourse[2] = DIC[2];
}
//Definition of the deconstructor from section D2.E
Student::~Student()
{
}