February 2005
Beginner to intermediate
272 pages
4h 53m
English
A high-level design often requires the creation of an object of the “appropriate” type, based on the type of an existing object. For example, we may have a pointer or reference to an Employee object of some kind, and we need to generate the appropriate kind of HRInfo object for that type of Employee, as shown in Figure 8.
Figure 8. Pseudoparallel hierarchies. How should we map an employee to its corresponding human resources information?

Here we have almost parallel Employee and HRInfo hierarchies. Salary and Hourly employees require the generation of an StdInfo object whereas a Temp requires a TempInfo object.
The high-level ...
Read now
Unlock full access