1 / 14

State Machine Diagram

State Machine Diagram. Page 260 - 269. 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. Multiple States:.

orsen
Télécharger la présentation

State Machine Diagram

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. State Machine Diagram Page 260 - 269

  2. The Printer • What ‘processes’ can you identify with a printer? OFFON • How do you get from OFF  ON: • press ON button or • onButtonPush() • onButtonPush() trigger name or transition name

  3. 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

  4. 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

  5. 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

  6. 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?

  7. 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

  8. Integrating OO models

  9. 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.

More Related