Java Reference
In-Depth Information
Suppose that the burn rate and thrust equations are:
The application in Figure 9.1 shows how t
peak
affects the burn rate and thrust of a rocket. As
a user moves the slider, the value of t
peak
changes, and the curves take on new shapes. Figure
9.2 shows the primary classes that make up the application. The
ShowBallistics_1
class
and the
BallisticsPanel_1
class are members of the
com.oozinoz.applications
package. The
BallisticsFunction
interface is a member of
the
com.oozinoz.ballistics
package. That package also contains a
Ballistics
utility class that provides that instances of
BallisticsFunction
that define the burn rate
and thrust curves.
Figure 9.2. The ballistics application registers itself to receive slider events.
When the ballistics application initializes the slider, the application registers itself to receive
slider events. When the slider changes, the application updates the panels that show the curves
and updates the label that shows the value of t
peak
.