-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudent.cpp
More file actions
122 lines (101 loc) · 2.6 KB
/
student.cpp
File metadata and controls
122 lines (101 loc) · 2.6 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
120
121
122
#include "student.h"
#include <iostream>
#include <iomanip>
using std::cout;
using std::left;
using std::setw;
using std::endl;
//Empty constructor
Student::Student()
{
this->studentID = "";
this->firstName = "";
this->lastName = "";
this->emailAddress = "";
this->studentAge = "";
for (int i = 0; i < 3; i++) this->daysToComplete[i] = daysToComplete[i];
this->dProgram = DegreeProgram::UNDECIDED;
};
//Full constructor
Student::Student(string studentID, string firstName, string lastName, string emailAddress, string studentAge, int daysToComplete[], DegreeProgram program)
{
this->studentID = studentID;
this->firstName = firstName;
this->lastName = lastName;
this->emailAddress = emailAddress;
this->studentAge = studentAge;
for (int i = 0; i < 3; i++) this->daysToComplete[i] = daysToComplete[i];
this->dProgram = program;
}
//Getters
string Student::getStudentID()
{
return studentID;
}
string Student::getFirstName()
{
return firstName;
}
string Student::getLastName()
{
return lastName;
}
string Student::getEmailAddress()
{
return emailAddress;
}
string Student::getStudentAge()
{
return studentAge;
}
int* Student::getDaysToComplete()
{
return daysToComplete;
}
inline DegreeProgram Student::getDegreeProgram()
{
return dProgram;
}
//Setters
void Student::setStudentID(string studentID)
{
this->studentID = studentID;
}
void Student::setFirstName(string firstName)
{
this->firstName = firstName;
}
void Student::setLastName(string lastName)
{
this->lastName = lastName;
}
void Student::setEmailAddress(string emailAddress)
{
this->emailAddress = emailAddress;
}
void Student::setStudentAge(string studentAge)
{
this->studentAge = studentAge;
}
void Student::setDaysToComplete(int daysToComplete[])
{
for (int i = 0; i < daysToCompleteSize; i++) this->daysToComplete[i] = daysToComplete[i];
}
void Student::setDegreeProgram(DegreeProgram d)
{
this->dProgram = d;
}
void Student::print()
{
cout << left << "Student ID: " << setw(1) << studentID;
cout << left << "\tFirst Name: " << setw(5) << firstName;
cout << left << "\tLast Name: " << setw(5) << lastName;
cout << left << "\tEmail: " << setw(5) << emailAddress;
cout << left << "Age: " << setw(5) << studentAge;
cout << left << "\tDays In Course: {" << daysToComplete[0] << ", ";
cout << left << daysToComplete[1] << ", ";
cout << left << daysToComplete[2] << "}";
cout << left << "\tDegree Program: " << setw(5) << DegreeProgramStrings[getDegreeProgram()] << endl << endl << endl;
}
Student::~Student() {
};