Rules for Forming Structured Programs

Figure 5.22 shows the rules for forming structured programs. The rules assume that action states may be used to indicate any action. The rules also assume that we begin with the simplest activity diagram (Fig. 5.23) consisting of only an initial state, an action state, a final state and transition arrows.

Image

Fig. 5.22 | Rules for forming structured programs.

Image

Fig. 5.23 | Simplest activity diagram.

Applying the rules in Fig. 5.22 always results in a properly structured activity diagram with a neat, building-block ...

Get Java™ How To Program (Early Objects), Tenth 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.