Class Hierarchy
salesperson.cpp
Go to the documentation of this file.
1 #include "salesperson.h"
2 #include <iostream>
3 #include <string>
4 using namespace std;
5 
6 SalesPerson:: SalesPerson(const string& name, int hours, float wageHour,
7  float commission, float percent)
8 : Worker(name,hours,wageHour), _commission(commission),
9  _percent(percent)
10 {
11  //ctor
12 }
13 
15 {
16  //dtor
17 }
18 
19 void SalesPerson::print(ostream& s) const
20 {
21  Worker::print(s);
22  // s << "Sales-Gehalt:" << payment() << endl; // dank virtueller Methode payment() nicht mehr noetig
23  s << "Prozent: " << _percent << endl;
24 }
void print(std::ostream &s) const override
Definition: worker.cpp:17
SalesPerson(const std::string &name, int hours, float wageHour, float commission, float percent)
virtual ~SalesPerson() override
Definition: salesperson.cpp:14
void print(std::ostream &s) const override
Definition: salesperson.cpp:19
Definition: worker.h:10