Oct 27th, 2005, 5:23 PM
|
#4
|
|
Programmer
Join Date: Oct 2005
Location: Portugal
Posts: 53
Rep Power: 3 
|
Thanks for the quickkkkkkkk replay!!!
This is main.cpp
#include <iostream>
#include "Pessoa.h"
#include "Data.h"
#include "Trabalhador.h"
#include "Chefe.h"
using namespace std;
int main()
{
Data hoje; Data d1(12,12,1990); Data d2(12,12,1980);
Chefe chefe_sec ("Paulo", "Santos", 40, d1);
chefe_sec.setSalario(300);
Trabalhador motorista("Hugo", "Mota", 25, hoje);
motorista.setSalario(150);
Trabalhador ajudante("Ana", "Ferreira", 20, hoje);
ajudante.setSalario(100);
Trabalhador secretaria("Maria", "Ferreira", 15, hoje);
secretaria.setSalario(80);
chefe_sec.add(motorista);
chefe_sec.add(ajudante);
Chefe chefe_dep ("Ernesto", "Pereira", 40, d2);
chefe_dep.setSalario(800);
chefe_dep.add(secretaria);
chefe_dep.add(chefe_sec);
chefe_dep.getFullInfo();
Chefe chefe_dep2 = chefe_dep;
system("PAUSE");
return 0;
}
Do you need the classes to?
|
|
|