TAILIEUCHUNG - Lecture Notes Software design and architecture – Chapter 26

Lecture 26 – State machine diagram. In this chapter, the following content will be discussed: UML behavioral diagrams, sequence diagram, UML behavioral diagrams, state machine diagram, elements of a state machine diagram, creating a state machine diagram. | Lecture Notes Lecture 26 – STATE MACHINE DIAGRAM INTERACTION DIAGRAMS When an analyst is attempting to understand the underlying domain of a problem, he or she must consider both structural and behavioral aspects of the problem. One of the primary differences between the class diagrams and the interaction diagrams, besides the obvious difference that one describes structure and the other behavior, is that the modeling focus on the class diagram is at the class level, while the interaction diagrams focus on the object level. STATE MACHINE DIAGRAM Some of the classes in class diagrams represent a set of objects that are quite dynamic in that they pass through a variety of states over the course of their existence. For example, a patient can change over time from being “new” to “current,”“former,” and so on, based on his or her status with the doctor’s office. A behavioral state machine is a dynamic model that shows the different states that a single object passes through during its life in response to events, along with its responses and actions. States, Events, Transitions, Actions, and Activities The state of an object is defined by the value of its attributes and its relationships with other objects at a particular point in time. For example, a patient might have a state of “new” or “current” or “former.” The attributes or properties of an object affect the state that it is in; however, not all attributes or attribute changes will make a difference. For example, think about a patient’s address. Those attributes make very little difference as to changes in a patient’s state. However, if states were based on a patient’s geographic location (., intown patients were treated differently than out-of-town patients), changes to the patient’s address would influence state changes. An event is something that takes place at a certain point in time and changes a value(s) that describes an object, which, in turn, changes the object’s state. It can be a designated condition becoming true, the receipt of the call for a method by an object, or the passage of a designated period of time. The state of the object determines exactly what the response will be. A transition is a relationship that represents the movement of an object from one state to another state. Some transitions will have a guard condition. A guard condition is a Boolean expression that includes attribute values, which allows a transition to occur only if the condition is true. An object typically moves from one state to another based on the outcome of an action that is triggered by an event. An action is an atomic, non-decomposable process than cannot be interrupted. From a practical perspective, actions take zero time, and they are associated with a transition. In contrast, an activity is a non-atomic, decomposable process that can be interrupted. Activities take a long period of time to complete, they can be started and stopped by an action, and they are associated with states.

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.