#include using namespace std ; class Person { public: string firstName ; string lastName ; string getName() { return ( firstName + " " + lastName ) ; } Person( string firstNameP, string lastNameP ) { firstName = firstNameP ; lastName = lastNameP ; } }; class Employee : public Person { public: string jobTitle ; Employee( string firstNameP, string lastNameP, string jobTitleP) :Person(firstNameP, lastNameP ) { jobTitle = jobTitleP ; } void print() { cout << getName() << " " << jobTitle << endl ; } }; int main() { Employee e1( "Alan" , "Turing" , "Programmer" ) ; e1.print() ; return 0 ; }