Class hierarchy and polymorphismus
Worker Class Reference

#include <worker.h>

Inheritance diagram for Worker:
Collaboration diagram for Worker:

Public Member Functions

 Worker (const std::string &name, float hours, float wageHours)
 
 ~Worker () override
 
 Worker (Worker const &)=default
 
Workeroperator= (Worker const &)=default
 
void print (std::ostream &s) const override
 
float payment () const override
 
- Public Member Functions inherited from Employee
 Employee (const std::string &name)
 
virtual ~Employee ()
 
 Employee (Employee const &)=default
 
Employeeoperator= (Employee const &)=default
 
std::string const & Get_name () const
 
int get_Counter () const
 

Detailed Description

Normaler Arbeiter (Packer) in einer Verkaufsstelle.

Definition at line 9 of file worker.h.

Constructor & Destructor Documentation

◆ Worker() [1/2]

Worker::Worker ( const std::string &  name,
float  hours,
float  wageHours 
)

Parameter constructor

Parameters
[in]nameName des Angestellten
[in]hoursArbeitsstunden
[in]wageHoursStundenlohn

◆ ~Worker()

Worker::~Worker ( )
override

Default destructor

Definition at line 12 of file worker.cpp.

◆ Worker() [2/2]

Worker::Worker ( Worker const &  )
default

Member Function Documentation

◆ operator=()

Worker& Worker::operator= ( Worker const &  )
default

◆ payment()

float Worker::payment ( ) const
inlineoverridevirtual

Berechnet das Gehalt.

Returns
Gehalt.

Implements Employee.

Definition at line 32 of file worker.h.

Here is the caller graph for this function:

◆ print()

void Worker::print ( std::ostream &  s) const
overridevirtual

Gibt die Daten der aktuellen Instanz aus.

Parameters
[in,out]sAusgabestrom

Reimplemented from Employee.

Definition at line 17 of file worker.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: