-
Notifications
You must be signed in to change notification settings - Fork 0
/
Employee.cpp
36 lines (30 loc) · 927 Bytes
/
Employee.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
#include "Headers/Employee.hpp"
Employee::Employee(const std::string personType,
std::string name,
std::string surname,
std::string adress,
const unsigned long int pesel,
const std::string sex,
float salary)
: Person(personType, name, surname, adress, pesel, sex)
, salary_(salary)
{}
bool Employee::operator==(const Employee& employee) const
{
return(personType_ == employee.getPersonType() and
name_ == employee.getName() and
surname_ == employee.getSurname() and
adress_ == employee.getAdress() and
pesel_ == employee.getPesel() and
sex_ == employee.getSex() and
salary_ == employee.getSalary());
}
float Employee::getSalary() const
{
return this->salary_;
}
void Employee::printPerson()
{
Person::printPerson();
std::cout << salary_ << " ";
}