-
Notifications
You must be signed in to change notification settings - Fork 0
/
Chef.h
47 lines (36 loc) · 1.07 KB
/
Chef.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Chef.h
*
* Only for restaurant Chefs
*/
//Included header files
#include "Employee.h"
#ifndef CHEF_H_
#define CHEF_H_
class Chef: public Employee
{
public:
//Chef constructor
Chef(string name, long id, char workType, long salary, long restEarnings, string specialty);
//Includes employee variables + extra monthly earning
//display constructor
virtual void display(ostream &out) const;
double myMonthlyPercent = .2;
double bonus = myMonthlyPercent * myRestEarnings;
double total = bonus + mySalary;
protected:
string mySpecialty;
};
//Definition of Chef constructor
inline Chef::Chef(string name, long id, char workType, long salary, long restEarnings, string specialty)
:Employee(name, id, workType, salary, restEarnings), mySpecialty(specialty) {}
//Definition of Owner display
inline void Chef::display(ostream &out) const
{
Employee::display(out);
out << "Monthly Bonus: $" << bonus << endl
<< "Monthly Earnings: $" << total << endl
<< "Title: " << "Chef" << endl
<< "Cuisine of Expertise: " << mySpecialty << endl;
}
#endif /* CHEF_H_ */