Class Hierarchy
worker.cpp
Go to the documentation of this file.
1 #include "worker.h"
2 #include <iostream>
3 #include <string>
4 using namespace std;
5 
6 Worker::Worker(const string& name, float hours, float wageHours)
7 : Employee(name), _hours(hours),_wageHours(wageHours)
8 {
9  //ctor
10 }
11 
13 {
14  //dtor
15 }
16 
17 void Worker::print(ostream& s) const
18 {
19  Employee::print(s);
20  // s << "Lohn: " << payment() << endl; // dank virtueller Methode payment() nicht mehr noetig
21 }
void print(std::ostream &s) const override
Definition: worker.cpp:17
Worker(const std::string &name, float hours, float wageHours)
~Worker() override
Definition: worker.cpp:12
virtual void print(std::ostream &s) const
Definition: employee.cpp:22