-
Notifications
You must be signed in to change notification settings - Fork 0
/
securityStudent.cpp
33 lines (28 loc) · 1.04 KB
/
securityStudent.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
#include <iostream>
#include <string>
#include "securityStudent.h"
using namespace std;
SecurityStudent::SecurityStudent():Student()
{
//This is the only work this constructor needs to do; the Student class will do the rest!!
degreeProgram = SECURITY;
}
SecurityStudent::SecurityStudent(string studentId, string firstName, string lastName, string email, string age, int days[], DegreeProgram degreeProgram)
:Student(studentId, firstName, lastName, email, age, days)
{
degreeProgram = SECURITY;
}
DegreeProgram SecurityStudent::getDegreeProgram()
{
return SECURITY;//Now we can do this - it's not virtual anymore
}
void SecurityStudent::print()
{
this->Student::print();//Call the print method fron the Student class
cout << "SECURITY" << "\n";//This is the only thing left to display
}
SecurityStudent::~SecurityStudent()
{
Student::~Student();//Call the super destructor from Student in case it needs to release something
//Note: objects should not destroy themselves; only what they dynamically create FOR themselves
}