+ All Categories
Home > Documents > State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a...

State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a...

Date post: 19-Jan-2016
Category:
Upload: candace-douthett
View: 218 times
Download: 0 times
Share this document with a friend
Popular Tags:
14
State Machine Diagram Page 260 - 269
Transcript
Page 1: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

State Machine Diagram

Page 260 - 269

Page 2: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

2

The Printer

• What ‘processes’ can you identify with a printer?

OFF ON• • How do you get from OFF ON: • press ON button or – onButtonPush() 

• onButtonPush()   trigger name or transition name

Page 3: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

3

Page 4: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

4

Multiple States:

• Objects are in different states at the same time – concurrent states

• What can happen with the printer while it is OFF?

• ????• What can happen with the printer while it is ON?• ???• While the printer is PRINTING/WORKING it

automatically check on availability of paper

Page 5: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

5

Page 6: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

6

Composite State: Naming

• Page 264 (5):• One way to identify a candidate for a composite state

is to determine – whether it is concurrent with several other states and– whether these other states depend on the original state

• • Why ON? • The ON state has several other states and paths that

can occur while the printer is in the ON State, and those states depend on the printer to be ON

Page 7: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

7

Page 8: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

8

ORDER ‘process’

• What makes up the ordering process – VERBS

• Open order  order is complete• Ready for shipping  begin shipping(paper work)• In shipping  shipping is complete (from

warehouse• (In between!!) Wait for back orders  arrival of

back order• Shipment  payment is cleared

Page 9: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

9

Page 10: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

10

Ordering?

• Are there any concurrent states?• In shipping & Waiting for back order?– In shipping: you busy picking and packing from

warehouse– During picking we realize there is NOT enough

items, we had to place a Re-order/Back-order• How will it work & what will we call the

composite state?

Page 11: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

11

Process of ‘In shipping’

• Page 269:• Introduce a new state: – In shipping and– The order cycles between Being shipped and

Waiting for back orders• Looping activities: – Go through steps 1 – 8, page 264, 265

Page 12: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

12

Page 13: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

13

Integrating OO models

Page 14: State Machine Diagram Page 260 - 269. The Printer What ‘processes’ can you identify with a printer? OFFON How do you get from OFF  ON: press ON button.

14

Given the following description of a Certified Parcel Shipments (CPS) shipment first identify all of the states and exit transitions, then develop a statechart. A shipment is first recognized after it has been picked up from a customer.  Once it is in the system it is considered to be active and in transit.  Every time it goes through a checkpoint, such as arrival at an intermediate destination, it is scanned and a record is created indicating the time and place of the checkpoint scan.  The status changes when it is placed on the delivery truck. It is still active, but now it is also considered to have a status of delivery pending.  Of course, once it is delivered the status changes again.  From time to time, a shipment has a destination that is outside of the area serviced by CPS.  In those cases, CPS has working relationships with other couriers.  Once a package is handed off to another courier, it is noted as being handed over.  In those instances, a tracking number for the new courier is recorded (if it is provided).  CPS also asks the new courier to provide a status change notice once the package has been delivered.  Unfortunately, from time to time a package gets lost.  In those cases, it remains in an active state for two weeks, but is also marked as misplaced.    If after two weeks it has not been found, it is considered lost.  At that point the customer can initiate lost procedures to recover any damages.  


Recommended