Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Part VI: Appendixes > Solution 3.1

Solution 3.1

(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.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint