Class hierarchy and polymorphismus
Loading...
Searching...
No Matches
worker.cpp
Go to the documentation of this file.
1#include "worker.h"
2#include <iostream>
3#include <string>
4using namespace std;
5
6Worker::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
17void Worker::print(ostream& s) const
18{
20 // s << "Lohn: " << payment() << endl; // dank virtueller Methode payment() nicht mehr noetig
21}
virtual void print(std::ostream &s) const
Definition employee.cpp:22
~Worker() override
Definition worker.cpp:12
Worker(const std::string &name, float hours, float wageHours)
void print(std::ostream &s) const override
Definition worker.cpp:17