-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstudent.cpp
More file actions
127 lines (92 loc) · 2.01 KB
/
student.cpp
File metadata and controls
127 lines (92 loc) · 2.01 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
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
115
116
117
118
119
//
// student.cpp
// C867 PA
//
// Created by Lydia Strough on 5/6/21.
//
#include <iostream>
#include <string>
#include "student.h"
using namespace std;
string Student::GetStudentID() {
return studentID;
}
string Student::GetFName() {
return fName;
}
string Student::GetLName() {
return lName;
}
string Student::GetEmail() {
return email;
}
int Student::GetAge() {
return age;
}
enum DegreeProgram Student::GetDegProgram() {
return degreeProgram;
}
int* Student::GetNumCourseDays() {
return numCourseDays;
}
void Student::SetStudentID(string sID) {
studentID = sID;
return;
}
void Student::SetFName(string fN) {
fName = fN;
return;
}
void Student::SetLName(string lN) {
lName = lN;
return;
}
void Student::SetEmail(string em) {
email = em;
return;
}
void Student::SetAge(int a) {
age = a;
return;
}
void Student::SetDegProgram(DegreeProgram deg) {
degreeProgram = deg;
return;
}
void Student::SetNumCourseDays(int courseDays[]) {
for(int i = 0; i < 3; i++) {
numCourseDays[i] = courseDays[i];
}
return;
}
Student::Student(string sID, string fN, string lN, string em, int a, int courseDays[], DegreeProgram deg) {
SetStudentID(sID);
SetFName(fN);
SetLName(lN);
SetEmail(em);
SetAge(a);
SetNumCourseDays(courseDays);
SetDegProgram(deg);
return;
}
string Student::ConvertEnum(DegreeProgram deg){
if(deg == SOFTWARE) {
return "SOFTWARE";
}
else if(deg == NETWORK) {
return "NETWORK";
}
else {
return "SECURITY";
}
}
void Student::Print() {
cout << GetStudentID() << "\t\t";
cout << GetFName() << "\t\t";
cout << GetLName() << " \t";
cout << GetEmail() << " \t";
cout << GetAge() << "\t\t";
cout << "{" << GetNumCourseDays()[0] << "," << GetNumCourseDays()[1] << "," << GetNumCourseDays()[2] << "}" << "\t\t";
cout << ConvertEnum(GetDegProgram()) << endl;
return;
}