"justify">} char * GetName ()
{Name;
} char * GetFName ()
{FName;
} boolGetGender ()
{Gender;
} struct Date GetDate ()
{BDate;
} int GetExperience () {return 0;}
}; amp; operator lt; lt; (ostream amp; os, Person amp; P)
{.widen(10);oslt;lt;P.GetSName()lt;lt;laquo;traquo;lt;lt;P.GetName()lt;lt;laquo;traquo;lt;lt;P.GetFName()
lt;lt;laquo;traquo;lt;lt;(P.GetGender()?laquo;Жraquo;:laquo;Чraquo;)lt;lt;laquo;traquo;
lt;lt;P.GetDate().DDlt;lt;laquo;.raquo;lt;lt;P.GetDate().MMlt;lt;laquo;.raquo;lt;lt;P.GetDate().YYYY;
} amp; operator gt; gt; (istream amp; is, Person amp; P)
{isgt;gt;P.SetName(laquo;raquo;)gt;gt;P.SetSName(laquo;raquo;)gt;gt;P.SetFName(laquo;raquo;)
gt;gt;P.SetGender(laquo;raquo;)gt;gt;P.BDate.DDgt;gt;P.BDate.MMgt;gt;P.BDate.YYYY;
};
Код класу «Emploee»
# pragma once
# include lt; cstring gt;
# include person.h Employee: public Person
{Organization [32]; Specialty [32]; Position [32]; Salary; Experience;: GetExperience ()
{Experience;
} (Employee amp; E)
{(Organization, E.Organization); (Position, E.Position); (Specialty, E.Specialty);=E.Salary;=E.Experience;
} (char SN [], char N [], char F [], bool G, int DD, int MM, int YYYY, char O [], Sp [], char P [] , int S, int E)
: Salary (S), Experience (E), Person (SN, N, F, G, DD, MM, YYYY)
{(Organization, O); (Position, P); (Specialty, Sp);
} char * GetSName ()
{Person :: GetSName ();
}
char * GetName ()
{Person :: GetName ();
}
char * GetFName ()
{Person :: GetFName ();
}
boolGetGender ()
{Person :: GetGender ();
} struct Date GetDate ()
{Person :: GetDate ();
} () {}
~ Employee () {}
istream amp; operator gt; gt; (istream amp; is, Employee amp; P); ostream amp; operator lt; lt; (ostream amp; os, Employee amp; P);
}; amp; operator lt; lt; (ostream amp; os, Employee amp; P)
{.widen(10);oslt;lt;P.GetSName()lt;lt;laquo;traquo;lt;lt;P.GetName()lt;lt;laquo;traquo;lt;lt;P.GetFName()
lt;lt;laquo;traquo;lt;lt;(P.GetGender()?laquo;Жraquo;:laquo;Чraquo;)lt;lt;laquo;traquo;
lt;lt;P.GetDate().DDlt;lt;laquo;.raquo;lt;lt;P.GetDate().MMlt;lt;laquo;.raquo;lt;lt;P.GetDate().YYYY
lt;lt;laquo;ttraquo;lt;lt;P.Organizationlt;lt;laquo;ttraquo;lt;lt;P.Specialtylt;lt;laquo;ttraquo;lt;lt;P.Position
lt;lt;laquo;ttraquo;lt;lt;P.Experiencelt;lt;laquo;ttraquo;lt;lt;P.Salary;
} amp; operator gt; gt; (istream amp; is, Employee amp; P)
{isgt;gt;P.SetName(laquo;raquo;)gt;gt;P.SetSName(laquo;raquo;)gt;gt;P.SetFName(laquo;raquo;)
gt;gt;P.SetGender(laquo;raquo;)gt;gt;P.BDate.DDgt;gt;P.BDate.MMgt;gt;P.BDate.YYYY
gt;gt;P.Organizationgt;gt;P.Specialtygt;gt;P.Positiongt;gt;P.Experiencegt;gt;P.Salary;
};