33 lines
666 B
C++
33 lines
666 B
C++
|
#include <iostream>
|
||
|
#include "Employee.hh"
|
||
|
#include "Manager.hh"
|
||
|
|
||
|
|
||
|
int main() {
|
||
|
Employee wouter("Wouter", 0);
|
||
|
Employee ivo("Ivo", 0);
|
||
|
Manager stan("Stan", 0);
|
||
|
Manager jo("Jo", 0);
|
||
|
Manager frank("Frank", 0);
|
||
|
|
||
|
|
||
|
stan.addSubordinate(wouter);
|
||
|
stan.addSubordinate(ivo);
|
||
|
|
||
|
frank.addSubordinate(stan); // This does not give a problem because stan is also of type Employee
|
||
|
frank.addSubordinate(jo);
|
||
|
|
||
|
// Print the Business Cards
|
||
|
frank.businessCard();
|
||
|
std::cout << std::endl;
|
||
|
jo.businessCard();
|
||
|
std::cout << std::endl;
|
||
|
stan.businessCard();
|
||
|
std::cout << std::endl;
|
||
|
wouter.businessCard();
|
||
|
std::cout << std::endl;
|
||
|
ivo.businessCard();
|
||
|
std::cout << std::endl;
|
||
|
|
||
|
}
|