Derive a class Programmer from Employee. Supply a constructor Programmer(string name, double salary) that calls the base-class constructor. Supply a function get_name that returns the name in the format “Hacker, Harry (Programmer)”.
1
Expert's answer
2013-06-14T09:10:51-0400
#ifndef CLASSES_H #define CLASSES_H
#include <iostream> #include <string>
using namespace std;
class Employee { protected: string name; double salary;
Comments
Leave a comment