Facade (Chapter 4)

SOLUTION 4.1Your diagram should look something like Figure B.3.
Figure B.3. This diagram shows the flight path application factored into one class for calculating a flight path, one for displaying a flight path, and one that simplifies use of the Swing libraries.

Note that all the methods of SwingFacade are static methods. Does your solution make these methods static? If not, why not?

SOLUTION 4.2Some differences to note between demos and facades follow.
  • A demo is usually a standalone application, whereas a facade is usually not.

  • A demo usually includes sample data; a facade does not.

  • A facade is usually configurable, whereas ...

Get Design Patterns Java™ Workbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.