-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstudent.cpp
94 lines (75 loc) · 1.73 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
#include<iostream>
#include<string>
#include "student.h"
#include "roster.h"
//get
string Student::getID() {
return this->studentID;
}
string Student::getFirstName() {
return this->firstName;
}
string Student::getLastName() {
return this->lastName;
}
string Student::getEmail() {
return this->email;
}
int Student::getAge() {
return this->age;
}
int * Student::getCompletion() {
return this->courseCompletion;
}
Degree Student::getDegreeProgram() {
return this->degreeType;
}
//set
void Student::setID(string studentID) {
this->studentID = studentID;
}
void Student::setFirstName(string firstName) {
this->firstName = firstName;
}
void Student::setLastName(string lastName) {
this->lastName = lastName;
}
void Student::setEmail(string email) {
this->email = email;
}
void Student::setAge(int age) {
this->age = age;
}
void Student::setCompletion(int courseCompletion[]) {
for (int i = 0; i < 3; ++i) {
this->courseCompletion[i] = courseCompletion[i];
}
}
void Student::setDegreeType(Degree degreeType) {
this->degreeType = degreeType;
}
//contstructor
Student::Student() {
this->studentID = "";
this->firstName = "";
this->lastName = "";
this->email = "";
this->age = 0;
this->courseCompletion[0] = 0;
this->courseCompletion[1] = 0;
this->courseCompletion[2] = 0;
}
Student::Student(string studentID, string firstName, string lastName,string email,
int age, int courseCompletion[]) {
this->studentID = studentID;
this->firstName = firstName;
this->lastName = lastName;
this->email = email;
this->age = age;
this->courseCompletion[0] = courseCompletion[0];
this->courseCompletion[1] = courseCompletion[1];
this->courseCompletion[2] = courseCompletion[2];
}
void Student::print() {}
//destructor
Student::~Student() {}