Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
(from page 20)
| 1: | Your solution should look something like the diagram in Figure B.1.
Figure B.1. The OozinozRocket class adapts the PhysicalRocket class to meet the needs declared in the RocketSim interface.
Instances of the OozinozRocket class can function as either PhysicalRocket objects or RocketSim objects. The ADAPTER pattern lets you adapt the methods you have to the ones that a client needs. |