UML Weekend Crash Course⢠- To Parent Directory
UML Weekend Crash Course⢠- To Parent Directory UML Weekend Crash Course⢠- To Parent Directory
Session 22—Modeling the Extended Features of the Statechart 233 control is shown by a single transition divided into multiple arrows pointing to multiple states or substates. The divide is accomplished with the fork bar you used in the Activity diagram and is illustrated in Figure 22-8. Merge of control can be modeled as multiple transition arrows pointing to a synchronization bar, as you saw earlier in learning about the Activity diagram. Synchronization is not shown in Figure 22-8. when temperature received(temperature) [temperature>76F]/ ^AirConditioner.turnOn() Cooling after tempdelay(seconds) ^Thermometer.getTemperature() Monitor Cooling Monitor Device Exit:^AirConditioner.turnOff() Figure 22-8 Split of control Concurrency By allowing multiple Statecharts within a state, the UML supports concurrency within a state. To model concurrency, simply split the superstate internal transition compartment into as many separate compartments as needed, one for each sub-Statechart. In the thermostat example, the Thermostat is doing two jobs at the same time: monitoring the cooling device and watching for problems with the device. So the Cooling state internal transition compartment is split in two by a line. Note that in this particular example each substate provides a different transition out of the superstate. The Monitor Cooling substate is watching for the event “when temperature received(temperature) [temperature < 70].” If it receives this event, it takes the Thermostat out of the Cooling state and back to monitoring the temperature. So what happens to the other substate Well, this hits on the definition of substate. A substate is a state within a state — in this case, Monitor Device within Cooling. If the Thermostat leaves the Cooling state, by definition it also leaves the Monitor Device state. This is illustrated in Figure 22-9. The same is true if the Monitor Device state receives the event it is waiting for.
234 Sunday Morning Monitor when temperature received(temperature) [temperature>76F]/ ^AirConditioner.turnOn() Cooling after tempdelay(seconds) ^Thermometer.getTemperature() when temperature received(temperature) [temperature
- Page 205 and 206: 182 Saturday Evening The next step
- Page 207 and 208: 184 Saturday Evening For Scenario 2
- Page 209 and 210: 186 Saturday Evening For subsequent
- Page 211 and 212: 188 Saturday Evening 6:addProduct(c
- Page 213 and 214: 190 Saturday Evening 7:addProduct(c
- Page 215 and 216: 192 Saturday Evening REVIEW The Col
- Page 217 and 218: 194 Saturday Evening Scenario 1 Get
- Page 219 and 220: 196 Saturday Evening pointing towar
- Page 221 and 222: 198 Saturday Evening :OrderFullfill
- Page 223 and 224: 200 Saturday Evening Scenario 5, in
- Page 226 and 227: SESSION 20 Modeling the Dynamic Vie
- Page 228 and 229: Session 20—Modeling the Dynamic V
- Page 230 and 231: Session 20—Modeling the Dynamic V
- Page 232 and 233: Session 20—Modeling the Dynamic V
- Page 234: Session 20—Modeling the Dynamic V
- Page 238 and 239: Part V — Sunday Morning Session 2
- Page 240 and 241: SESSION 21 Applying the Basic State
- Page 242 and 243: Session 21—Applying the Basic Sta
- Page 244 and 245: Session 21—Applying the Basic Sta
- Page 246 and 247: Session 21—Applying the Basic Sta
- Page 248: Session 21—Applying the Basic Sta
- Page 251 and 252: 228 Sunday Morning receivePmt(amt)[
- Page 253 and 254: 230 Sunday Morning Figure 22-4 repr
- Page 255: 232 Sunday Morning A substate is a
- Page 260 and 261: SESSION 23 Applying the Extended St
- Page 262 and 263: Session 23—Applying the Extended
- Page 264 and 265: Session 23—Applying the Extended
- Page 266 and 267: Session 23—Applying the Extended
- Page 268 and 269: SESSION 24 Modeling the Development
- Page 270 and 271: Session 24—Modeling the Developme
- Page 272 and 273: Session 24—Modeling the Developme
- Page 274 and 275: Session 24—Modeling the Developme
- Page 276 and 277: Session 24—Modeling the Developme
- Page 278 and 279: SESSION 25 Modeling the Static View
- Page 280 and 281: Session 25—Modeling the Static Vi
- Page 282 and 283: Session 25—Modeling the Static Vi
- Page 284 and 285: Session 25—Modeling the Static Vi
- Page 286 and 287: SESSION 26 Modeling the Static View
- Page 288 and 289: Session 26—Modeling the Static Vi
- Page 290 and 291: Session 26—Modeling the Static Vi
- Page 292 and 293: Session 26—Modeling the Static Vi
- Page 294 and 295: Session 26—Modeling the Static Vi
- Page 296 and 297: PART # V Sunday Morning Part Review
- Page 299 and 300: PART VI Sunday Afternoon Session 27
- Page 301 and 302: 278 Sunday Afternoon design, and mo
- Page 303 and 304: 280 Sunday Afternoon :User :Web Br
- Page 305 and 306: 282 Sunday Afternoon studied Java p
234<br />
Sunday Morning<br />
Monitor<br />
when temperature received(temperature)<br />
[temperature>76F]/<br />
^AirConditioner.turnOn()<br />
Cooling<br />
after tempdelay(seconds)<br />
^Thermometer.getTemperature()<br />
when temperature received(temperature)<br />
[temperature