11.2 (Composition vs. Inheritance) Many apps written with inheritance could be written with composition instead, and vice versa. Rewrite class
BasePlusCommissionEmployee (Fig. 11.13) of the
BasePlusCommissionEmployee hierarchy to use composition rather than inheritance.
11.3 (Inheritance and Software Reuse) Discuss the ways in which inheritance promotes software reuse, saves time during app development and helps prevent errors.
11.4 (Student Inheritance Hierarchy) Draw a UML class diagram for an inheritance hierarchy for students at a university similar to the hierarchy shown in Fig. 11.2. Use
Student as the base class of the hierarchy, then extend
Student with classes
GraduateStudent. Continue ...