Design Patterns Java™ Workbook

(Michael S) #1
Chapter 4. Facade

Figure 4.1. The FlightPanel_1 class displays the flight path of an unexploded shell.

Aerial shells are designed to explode high in the sky, with spectacular results. But
occasionally, a shell does not explode at all; it is a dud. If a shell does not explode, its return
to Earth becomes interesting. A shell, unlike a rocket, is unpowered, so if you ignore the
effects of wind and air resistance, the flight path of a dud is a simple parabola. Figure 4.2
shows a screen shot of the window that appears when you execute
Flight-Panel_1.main().

Free download pdf