Đang chuẩn bị liên kết để tải về tài liệu:
Reverse Engineering of Object Oriented Code phần 6

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Trường hợp thử nghiệm cuối cùng (4,8 Hình, TC3) cho thấy sự đa dạng của BinaryTreeNode2 (Hình 4.3) cũng có thể được lớn hơn 1. Việc so sánh các sơ đồ trong hình. 4.8 (bên phải) với điều đó trong hình. 4,3 điểm nổi bật tính chất khác nhau và bổ sung thông tin mà họ cung cấp. | 5.2 Interaction Diagram Recovery 101 -------------------------- eLib example-------------------------- Let us consider the direct and indirect method calls issued from inside the body of method returnDocument class Library line 66 shown in Table 5.2. The first called method isOut in turn invokes method isAvailable from class Document. Method getBorrower second call in returnDocument invokes getUser from class Loan. Finally Library.removeLoan the last invocation inside returnDocument triggers the execution of four methods reported at the bottom-right of Table 5.2. These do not perform any further method invocation. Library.returnDocument Line Num Called method 68 1 Document.isOut 69 2 Document.getBorrower 71 3 Library.removeLoan Document.isOut Line Num Called method 180 1 Document.isAvailable Document.getBorrower Line Num Called method 187 1 Loan.getUser Library.removeLoan Line Num Called method 50 1 Loan getUser 51 2 Loan.getDocument 53 3 User.removeLoan 54 4 Document.removeLoan Table 5.2. Transitive method calls issued from method returnDocument in class Library. Column Num reports their numbering. Method calls are numbered in Table 5.2 column Num according to the rules given in Fig. 5.7. Let us consider a collaboration diagram focused on method Library.returnDocument. Computation of the Dewey numbers see Fig. 5.8 starts with the body of method Library.returnDocument and an empty Dewey value. The three calls issued inside this method are thus numbered 1 2 3. Procedure numberFocusedCalls is then reapplied to the body of Document.isOut with a current Dewey value equal to 1. The call to isAvailable issued inside Document.isOut is correspondingly numbered 1.1. Similarly the call to Loan.getUser inside Document.getBorrower is numbered 2.1. Another call to the same method issued from method Library.removeLoan receives a different Dewey number 3.1. The final Dewey numbers produced for the collaboration diagram focused on returnDocument are displayed in Fig. 5.9. 102 5 .