aboutsummaryrefslogtreecommitdiff
path: root/inheritance/polymorphism/employee.cxx
blob: 83a51e6980e259b058504441bd334203df7eb306 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// file      : inheritance/polymorphism/employee.cxx
// copyright : not copyrighted - public domain

#include <iostream>

#include "employee.hxx"

using namespace std;

person::
~person ()
{
}

void employee::
print ()
{
  cout << first_ << ' ' << last_
       << (temporary_ ? " temporary " : " permanent ")
       << "employee" << endl;
}

void contractor::
print ()
{
  cout << first_ << ' ' << last_ << ' ' << email_ << " contractor" << endl;
}