Home Segments Top Top Previous Next

297: Mainline

The altered four-parameter constructor calls only the three-parameter constructor. Thus, the four-parameter constructor leaves it to the three-parameter constructor to call the zero-parameter constructor in the Attraction class.

*------------------* 
| Attraction:      | 
|                  | 
| constructors:    | 
|  zero parameter <---* 
|                  |  | 
*------------------*  | 
  ^                   | 
  | extends           | 
*------------------*  | 
| Movie:           |  | 
|                  |  | 
| constructors:    |  | 
|  three parameter ---* 
|    ^             | 
|    |             | 
|  four parameter  | 
|                  | 
*------------------*