12.6.3. Creating Concrete Derived Class CommissionEmployee
CommissionEmployee (Figs. 12.13–12.14) derives from
Employee (Fig. 12.13, line 9). The member-function implementations (Fig. 12.14) include a constructor (lines 9–15) that takes a first name, last name, social security number, sales amount and commission rate; set functions (lines 18–24 and 33–39) to assign new values to data members
grossSales, respectively; get functions (lines 27–30 and 42–45) that retrieve their values; function
earnings (lines 48–51) to calculate a
CommissionEmployee’s earnings; and function
"commission employee: " and employee-specific information. The constructor passes the first ...