Class hierarchy and polymorphismus
Loading...
Searching...
No Matches
salesperson.cpp
Go to the documentation of this file.
1#include "salesperson.h"
2#include <iostream>
3#include <string>
4using namespace std;
5
6salesPerson:: salesPerson(const string& name, float 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
19void salesPerson::print(ostream& s) const
20{
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
void print(std::ostream &s) const override
salesPerson(const std::string &name, float hours, float wageHour, float commission, float percent)
virtual ~salesPerson() override