Storing data in an array using mixed objects (cont'd)

(Display Listing 2.)

This program uses five statements to store the following kinds of objects in a five-element array of type Object:

Then the program causes none, one, or more of the objects to become visible, depending on a numeric value entered by the user.

(Display Figure 15.)

Figure 15 shows a screen shot of the five objects after they have all become visible.