-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhlsuper.cpp
More file actions
40 lines (33 loc) · 1.19 KB
/
hlsuper.cpp
File metadata and controls
40 lines (33 loc) · 1.19 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
/** File hlsuper.cpp
*
* @author Nathaniel Miller
*
* Class HighLevelSupervisor definitions.
* Holds functions associated with the HighLevelSupervisor class.
*/
#include "hlsuper.h"
#include "supervisor.h"
#include "empl.h"
/* default constructor for a high-level supervisor object */
HighLevelSupervisor::HighLevelSupervisor() {
}
/* creates a high-level supervisor object with the given parameters as data,
* calls the Supevisor base-class constructor explicitly.
*/
HighLevelSupervisor::HighLevelSupervisor(string emp_name, int salary,
string dept, int subords)
: Supervisor(emp_name, salary, dept, subords)
{
department = dept; // set the supervisor's department field
subordinates = subords; // set the supervisor's subordinates field
}
/* prints a supervisor object */
void HighLevelSupervisor::print_hlsuper() {
cout << "HighLevel "; // ouput high-level supervisor qualifier
Supervisor::print_super(); // invoke the Supervisor superclass method
}
/* prints a supervisor object, virtual declaration version*/
void HighLevelSupervisor::printv() {
cout << "HighLevel "; // ouput high-level supervisor qualifier
Supervisor::printv(); // invoke the Supervisor superclass method
}