tailieunhanh - UML WEEKEND CRASH COURSE phần 8

Nó có thể đại diện cho hệ thống sẽ đáp ứng các hành động từ người sử dụng, làm thế nào duy trì tính toàn vẹn nội bộ, làm thế nào dữ liệu được chuyển từ lưu trữ đến một cái nhìn người sử dụng, và làm thế nào các đối tượng được tạo ra và thao tác. Mục tiêu của phương pháp là cung cấp một bản phát hành thực thi của một sản phẩm, một tăng của sản phẩm, hàng vượt qua, hoặc lặp đi lặp lại, thông qua quá trình này. . | 238 Sunday Morning Figure 23-1 A basic Sequence diagram with events and transitions The challenging part of mapping the Sequence diagram to the Statechart diagram is to determine the condition of the object between the events and name it as accurately as possible. The same state may appear in many Sequence diagrams. Accurate naming can prevent confusion when you merge the states from the many Sequence diagrams. To choose an accurate name remember that the state of an object is defined by its attribute values. Describe the object in terms of its attributes for example open closed open and overdrawn or filled and not shipped . Adjectives make very good state names but you might need more than one adjective to fully describe the current condition of the object. Figure 23-2 shows how to map the events and corresponding gaps on the lifeline of the Sequence diagram to candidate states and events on the Statechart diagram. Candidate State 1 Candidate State 2 Candidate State 3 Figure 23-2 Mapping a Sequence diagram to a Statechart diagram Session 23 Applying the Extended Statechart Features to the Case Study 239 20 Min. To Go Understanding these concepts is a lot easier when you can see an example so I m going to derive a Statechart diagram for the Product object and do it a step at a time so you can see the progression. I ll work through the same series of steps for each scenario 1. Identify the events directed at the lifeline of the Product object. 2. Identify candidate states by isolating the gaps of the lifeline between the incoming events. 3. Name the candidate states using adjectives that describe the condition of the object during the period of time represented by the gap. 4. Add the new states and events to the Product Statechart. The first scenario is modeled in Figure 23-3. There is one incoming event called Product PO . This is the constructor operation that creates the object. Before this event this particular Product object didn t exist so you have discovered

TỪ KHÓA LIÊN QUAN