20.4. Creating Methods from Interaction Diagrams

An interaction diagram shows the messages that are sent in response to a method invocation. The sequence of these messages translates to a series of statements in the method definition. The enterItem interaction diagram in Figure 20.6 illustrates the Java definition of the enterItem method.

Figure 20.6. The enterItem interaction diagram.

In this example, the Register class will be used. A Java definition is shown in Figure 20.7.

Figure 20.7. The Register class.

The Register--enterItem Method

The ...

Get Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.