-
Notifications
You must be signed in to change notification settings - Fork 1
/
Student.cpp
129 lines (102 loc) · 2.15 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*
C867-Scripting and Programming: Applications
Language: C++
David Sainvilus
StudentID: 001049272
*/
#include <iostream>
#include <string>
#include "Student.h"
#include "Degree.h"
using namespace std;
// default constructor definition
/*Student::Student()
{
this->studentID = "";
this->firstName = "";
this->lastName = "";
this->emailAddress = "";
this->age = 0;
this->numDays[0] = (int)0;
this->numDays[1] = (int)1;
this->numDays[2] = (int)2;
this->degree = Degree::SECURITY;
}
*/
Student::Student(string studID, string fiName, string laName, string emAddr, int a, int* nmDays, Degree degree)
{
this->studentID = studID;
this->firstName = fiName;
this->lastName = laName;
this->emailAddress = emAddr;
this->age = a;
this->numDays[0] = nmDays[0];
this->numDays[1] = nmDays[1];
this->numDays[2] = nmDays[2];
this->degree = degree;
}
string Student::getStudentID() {
return studentID;
}
void Student::setStudentID(string studID) {
studentID = studID;
//studentID = studID;
}
string Student::getFirstName()
{
return firstName;
}
void Student::setFirstName(string fiName)
{
firstName = fiName;
}
string Student::getLastName()
{
return lastName;
}
void Student::setLastName(string laName)
{
lastName = laName;
}
string Student::getEmailAddress()
{
return emailAddress;
}
void Student::setEmailAddress(string emAddr)
{
emailAddress = emAddr;
}
int Student::getAge()
{
return age;
}
void Student::setAge(int a)
{
age = a;
}
int* Student::getNumDays() {
return numDays;
}
void Student::setNumDays(int day0, int day1, int day2)
{
numDays[0] = day0;
numDays[1] = day1;
numDays[2] = day2;
}
Degree Student::getDegree()
{
return degree;
}
void Student::setDegree(Degree degree)
{
this->degree = degree;
}
//Student::Student() {}
void Student::print() {
cout << "StudentID:" << getStudentID() << "\t" << " First Name:" << getFirstName() << "\t" << " Last Name:" << getLastName() << "\t" << "Age:" << getAge() << "\t" << " daysInCourse:{"; cout << getNumDays()[0] << "," << getNumDays()[1] << "," << getNumDays()[2] << "}";
cout <<"Degree:"<< degreeTypeStrings[this->getDegree()]<<endl;
}
// default deconstructor definition
Student::~Student()
{
}