-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofessorType.cpp
93 lines (82 loc) · 2.34 KB
/
professorType.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
#include "professorType.h"
#include "personType.h"
// Constructors
professorType::professorType():personType()
{
eID = "UNKNOWN";
dp = "UNKNOWN";
degree = "UNKNOWN";
}
// fName, lName//
professorType::professorType(string firstName, string lastName)
:personType(firstName, lastName)
{
setEID("UNKNOWN");
setDP("UNKNOWN");
setDegree("UNKNOWN");
}
//Constructor with parameters
professorType::professorType(string firstName, string lastName, string oneAddress, double tall, string birth, char fM
, string employeeID, string depart, string dips)
:personType(firstName, lastName, oneAddress, tall, birth, fM)
{
setEID(employeeID);
setDP(depart);
setDegree(dips);
}
// Setters
//Function to set employee ID according to the parameters.
//Postcondition: eID = employeeID
void professorType::setEID(string employeeID)
{
eID = employeeID;
}
//Function to set name of department according to the parameters.
//Postcondition: dp = depart
void professorType::setDP(string depart)
{
dp = depart;
}
//Function to set name of degrees according to the parameters.
//Postcondition: degree = dips
void professorType::setDegree(string dips)
{
degree = dips;
}
// Getters
//Function to return the employee ID.
//Postcondition: The value of eID is returned.
string professorType::getEID() const
{
return eID;
}
//Function to return the name of department.
//Postcondition: The value of dp is returned.
string professorType::getDP() const
{
return dp;
}
//Function to return the name of degree(s).
//Postcondition: The value of degree is returned.
string professorType::getDegree() const
{
return degree;
}
// Methods
//Prints function
//Function to output the first name, last name, address, height, dob, gender, employeeID, department, degree
void professorType::print() const
{
cout << left;
personType::print();
cout << left << "*Number ID: " << setw(10) << getEID() << setw(57) << right << "*";
cout << left << "\n*Department: " << setw(29) << getDP() << setw(38) << right << "*";
cout << left << "\n*Degree(s): " << setw(24) << getDegree() << setw(44) << right << "*";
cout << left << "\n********************************************************************************" << endl << endl;
}
//Equals function
bool professorType::equals(string type) const
{
bool set = false;
return set;
}