Bài giảng Lập trình hướng đối tượng: Chương 4 - TS. Trương Quốc Định

Bài giảng "Lập trình hướng đối tượng - Chương 4: Sơ đồ tương tác" cung cấp cho người đọc các kiến thức: Interaction Diagrams, a First Look at Sequence Diagrams, Synchronous Messages, Lost Message,. nội dung chi tiết. | Chương 4 : Sơ đồ tương tác GV : TS. Trương Quốc Định Sequence Diagrams Interaction Diagrams A series of diagrams describing the dynamic behavior of an object-oriented system. A set of messages exchanged among a set of objects within a context to accomplish a purpose. Often used to model the way a use case is realized through a sequence of messages between objects. Sequence Diagrams Interaction Diagrams (Cont.) The purpose of Interaction diagrams is to: Model interactions between objects Assist in understanding how a system (a use case) actually works Verify that a use case description can be supported by the existing classes Identify responsibilities/operations and assign them to classes Sequence Diagrams Interaction Diagrams (Cont.) UML Collaboration Diagrams Emphasizes structural relations between objects Sequence Diagram The subject of this tutorial Sequence Diagrams A First Look at Sequence Diagrams Illustrates how objects interacts with each other. Emphasizes time ordering of messages. Can model simple sequential flow, branching, iteration, recursion and concurrency. Sequence Diagrams Object Object naming: syntax: [instanceName][:className] Name classes consistently with your class diagram (same classes). Include instance names when objects are referred to in messages or when several objects of the same type exist in the diagram. The Life-Line represents the object’s life during the interaction Lifelines are drawn as a box with a dashed line descending from the center of the bottom edge. The lifeline's name is placed inside the box. myBirthday :Date Sequence Diagrams Messages An interaction between two objects is performed as a message sent from one object to another (simple operation call, Signaling, ) If object obj1 sends a message to another object obj2 some link must exist between those two objects Sequence Diagrams Messages (Cont.) A message is represented by an arrow between the life lines of two objects. Self calls are . | Chương 4 : Sơ đồ tương tác GV : TS. Trương Quốc Định Sequence Diagrams Interaction Diagrams A series of diagrams describing the dynamic behavior of an object-oriented system. A set of messages exchanged among a set of objects within a context to accomplish a purpose. Often used to model the way a use case is realized through a sequence of messages between objects. Sequence Diagrams Interaction Diagrams (Cont.) The purpose of Interaction diagrams is to: Model interactions between objects Assist in understanding how a system (a use case) actually works Verify that a use case description can be supported by the existing classes Identify responsibilities/operations and assign them to classes Sequence Diagrams Interaction Diagrams (Cont.) UML Collaboration Diagrams Emphasizes structural relations between objects Sequence Diagram The subject of this tutorial Sequence Diagrams A First Look at Sequence Diagrams Illustrates how objects interacts with each other. Emphasizes

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã 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.