-
Notifications
You must be signed in to change notification settings - Fork 0
/
Faculty.h
33 lines (28 loc) · 1.06 KB
/
Faculty.h
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
// Faculty Class
#pragma once
#include "Person.h"
class Faculty : public Person
{
friend std::ostream& operator<<(std::ostream& os, Faculty& f);
public:
Faculty() {}
~Faculty() {}
void setDateHired(int hd, int hm, int hy) { dateHired.setDate(hd, hm, hy); }
void setTitle(std::string t) { title = t; }
void setRank(std::string r) { rank = r; }
void setSalary(double s) { salary = s; }
Date getDateHired() { return dateHired; }
std::string getTitle() { return title; }
std::string getRank() { return rank; }
double getSalary() { return salary; }
private:
Date dateHired;
std::string title;
std::string rank;
double salary;
};
std::ostream& operator<<(std::ostream& os, Faculty& f)
{
os << std::endl << "ID:\t\t\t" << f.getID() << std::endl << "Name:\t\t\t" << f.getTitle() << " " << f.getFirstName() << " " << f.getLastName() << ", " << f.getRank() << std::endl << "Birth Date:\t\t" << f.getBirthDate() << std::endl << "Hired Date:\t\t" << f.getDateHired() << std::endl << "Salary:\t\t\t" << f.getSalary() << std::endl;
return os;
}