Give the definitions of the constructors for the class TitledEmployee that you gave as the answer to Self-Test Exercise 5. Also, give the redefinition of the member function set_name. The function set_name should insert the title into the name.
Do not bother with #include directives or namespace details.
{
TitledEmployee::TitledEmployee( )
: SalariedEmployee( ), title("No title yet")
{
}
TitledEmployee::TitledEmployee(string the_name,
string the_title,
string the_ssn, double the_salary)
: SalariedEmployee(the_name, the_ssn, the_salary),
title(the_title)
{
}
void TitledEmployee::set_name(string the_name)
{
Employee::set_name(title + the_name);
}
}