Now we redeclare class
BasePlusCommissionEmployee (Fig. G.8) to extend class
CommissionEmployee (Fig. G.4). A
BasePlusCommissionEmployee object is a
CommissionEmployee, because inheritance passes on class
CommissionEmployee’s capabilities. Class
BasePlusCommissionEmployee also has instance variable
baseSalary (Fig. G.8, line 6). Keyword
extends (line 4) indicates inheritance.
CommissionEmployee’s instance variables and methods, but only the superclass’s
protected members are directly accessible in the subclass. The
CommissionEmployee constructor is not inherited. So, the
public BasePlusCommissionEmployee services ...