tailieunhanh - Bài 8. Thiết kế lớp

Tạo ra các tên thao tác thích hợp: Mô tả kết quả, Sử dụng góc nhìn của đối tượng khách (gọi), Nhất quán giữa các lớp. Xác định chữ ký của thao tác operationName([direction]parameter : class,) : returnType Direction: in (mặc định), out hoặc inout | OBJECT-ORIENTED ANALYSIS AND DESIGN WITH UML Bài 8. Thiết kế lớp Bé m«n C«ng nghÖ phÇn mÒm KHOA CÔNG NGHỆ THÔNG TIN TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI Mô hình thiết kế Nội dung Xác định các thao tác (Operation) Xác định phương thức (Method) Xác định các liên kết (Association) Xác định các thuộc tính (Attribute) Xác định phụ thuộc (Dependency) Xác định tổng quát hóa (Generalization) Ánh xạ các thông điệp trong biểu đồ tương tác thành các thao tác của các lớp 1. Xác định các thao tác : ClassA 1 : performResponsibility (): result : ClassB ClassB + performResponsibility(): result Emphasize how operations and attributes are domain dependent. As a quick in-class exercise: Pick a class, pick two different domains, pick two students, one for each domain, and have them choose relevant operations and attributes for the class. Stress that because the process is use-case-driven, all discovered operations and attributes should support at least one . | OBJECT-ORIENTED ANALYSIS AND DESIGN WITH UML Bài 8. Thiết kế lớp Bé m«n C«ng nghÖ phÇn mÒm KHOA CÔNG NGHỆ THÔNG TIN TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI Mô hình thiết kế Nội dung Xác định các thao tác (Operation) Xác định phương thức (Method) Xác định các liên kết (Association) Xác định các thuộc tính (Attribute) Xác định phụ thuộc (Dependency) Xác định tổng quát hóa (Generalization) Ánh xạ các thông điệp trong biểu đồ tương tác thành các thao tác của các lớp 1. Xác định các thao tác : ClassA 1 : performResponsibility (): result : ClassB ClassB + performResponsibility(): result Emphasize how operations and attributes are domain dependent. As a quick in-class exercise: Pick a class, pick two different domains, pick two students, one for each domain, and have them choose relevant operations and attributes for the class. Stress that because the process is use-case-driven, all discovered operations and attributes should support at least one use case. Thus, the attributes/operations that are discovered are affected by what functionality/domain you are modeling. While discussing where to find operations, it is worth exploring with which object an operation belongs. You will find that the operation always goes in the supplier object. On the interaction diagram, the client is initiating a request from the supplier, so the supplier object/class has the operation. Some people, especially people used to functional decomposition, get this confused initially. To identify operations on design classes: Study the responsibilities of each corresponding analysis class, creating an operation for each responsibility. Use the description of the responsibility as the initial description of the operation. Study the Use-Case Realizations in the class participations to see how the operations are used by the Use-Case Realizations. Extend the operations, one Use-Case Realization at a time, refining the operations, their descriptions, return .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã 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.