include ltiostreamhgt include


#include
#include
#include
#include
#include


class Employee
{
private:
char *Name; //Set them as pointers...
int IdNumber;
char *Department;
char *Position;

public:

void setName(char Name);
void setDepartment(char Dept);
void setIdNumber(int ID);
void setPosition(char POS);
}
{
Employee::Employee()
{
Name=" ";
IdNumber=0;
Department=" ";
Position=" ";
}
void Employee::setName(const char* Name)
{
Name = Name;
}
void Employee::setIdNumber(int ID)
{
IdNumber = ID;
}
void Employee::setDepartment(const char* Dept) //WTF? why integer? Keep as character string!
{
Department = Dept;
}
void Employee::setPosition (const char* POS) //Same thing here!
{
Position = POS;
}
char Employee::getName() //const //What are these for?
{
return Name;
}
int Employee::getIdNumber() //const //What are these for? Plus, get your return types right!
{
return IdNumber;
}
char Employee::getDepartment() //const //What are these for? Plus, get your return types right!
{
return Department;
}
char Employee::getPosition() //const //What are these for? Plus, get your return types right!
{
return Position;
}
int main()
{
Employee SusanMeyer(), MarkJones(), JoyRogers();
SusanMeyer.setPosition("Vice President"); //etc.. for all the other guys...
}
getch();
};

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: include ltiostreamhgt include
Reference No:- TGS0353609

Expected delivery within 24 Hours