Java Reference
In-Depth Information
CHALLENGE 3.1
Complete the class diagram in Figure 3.2 to show the design of a ShellAsRocket
class that lets a Shell object participate in a simulation as a RocketSim object.
Figure 3.2. You can adapt a shell's methods to meet the needs of a rocket
simulation.
Units of Measure
The classes and interfaces in the com.oozinoz.units package help developers at
Oozinoz to prevent unit conversion errors. Rather than using double to represent
everything from inches of length to pounds of force, the Oozinoz developers have
created a sophisticated object model for measurements.
A measure is a combination of a magnitude and a dimension. A dimension is an
aggregation of a measure's length, mass, and time exponents. For example, a
volume, such as one ft 3 , is three dimensional in length. An acceleration of 9.8
meters/second 2 has a length dimension of 1 and a time dimension of -2. The units
package models commonly used dimensions, as Figure 3.3 shows. Note that the
subclasses of Measure are dimensions, such as Length and Force , not units,
such as inches and pounds.
Search WWH ::




Custom Search