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 28 29 30 31 32 33 34 35 36 37
|
#ifndef PERSON_H
#define PERSON_H
#include "PersonalInfo.h"
#include "Employer.h"
#include "Sales.h"
#include "Service.h"
#include "Manufacturing.h"
using namespace std;
class Person
{
private:
PersonalInfo info;
Employer employer;
public:
Person(){}
Person(string emptypeIn, string fnameIn, string lnameIn, unsigned ageIn, string phoneIn)
:info(emptypeIn, fnameIn, lnameIn, ageIn, phoneIn){}
Person(string emptypeIn, fnameIn, string lnameIn, unsigned ageIn, string phoneIn, string email)
:employer(emptypeIn, fnameIn, lnameIn, ageIn, phoneIn, email) {}
//set functions
void setFirstName(string nameIn);
void setLastName(string nameIn);
void setAge(unsigned ageIn);
void setTelephone(string phoneIn);
void setEmail(string emailIn);
//get functions
string getFirstName()const { return info.getFirstName(); }
string getLastName()const { return info.getLastName(); }
unsigned getAge() const { return info.getAge(); }
string getTelephone()const { return info.getTelephone(); }
string getEmail()const { return employer.getEmail(); }
};
ostream &operator<<(ostream &os, const Person &person);
#endif /* PERSON_H */
|