Class Hierarchy
worker.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "employee.h"
4 #include <iostream>
5 #include <string>
6 
9 class Worker : public Employee
10 {
11  public:
17  Worker(const std::string& name, float hours, float wageHours);
19  ~Worker() override;
20 
24  void print(std::ostream& s) const override;
25 
29  float payment() const override
30  {return _hours*_wageHours ; }
31  protected:
32  private:
33  float _hours;
34  float _wageHours;
35 };
36 
Definition: worker.h:10
float payment() const override
Definition: worker.h:29
~Worker() override
Definition: worker.cpp:12
Worker(const std::string &name, float hours, float wageHours)
Definition: worker.cpp:6
void print(std::ostream &s) const override
Definition: worker.cpp:17