March 2002
Intermediate to advanced
496 pages
8h 51m
English
| SOLUTION 20.1 | CHAIN OF RESPONSIBILITY distributes an operation across a chain of objects. Each method implements the operation's service directly or forwards calls to the next object in the chain. |
| SOLUTION 20.2 | The figure shows one algorithm—the procedure to determine whether an object model is a tree—two operations,which appear as two signatures in the MachineComponent class, and four methods. |
| SOLUTION 20.3 | No. If you change the return value of MachineSimulator.clone(), it won't compile. The clone() signature matches the signature of Object.clone(), so the return type must match as well. |
| SOLUTION 20.4 | The program prints "false". Static methods are invoked with reference to an object's declared type, not with reference ... |
Read now
Unlock full access