//=============================================================================

#include <iostream>
#include <string>
#include <unordered_set>
#include <map>
#include <memory>
#include <thread>
#include <vector>
using namespace std;

//-----------------------------------------------------------------------------

class Angestellter
{
public:
   virtual string getName() const { return "Angestellter"; }
   virtual int getGehalt() const { return 100; }
};

class Vertriebler : public Angestellter
{
public:
   string getName() const { return "Vertriebler"; }
   int getGehalt() const { return 200; }
};

class Student : public Angestellter
{
public:
   string getName() const { return "Student"; }
   int getGehalt() const { return 40; }
};

//-----------------------------------------------------------------------------

int main()
{
   cout << "FH2022_02\n\n";

   vector<unique_ptr<Angestellter>> v;
   v.push_back(make_unique<Angestellter>());
   v.push_back(make_unique<Vertriebler>());
   v.push_back(make_unique<Student>());

   for (auto& ptr : v)
   {
      cout << ptr->getName() << ": " << ptr->getGehalt() << '\n';
   }

}
