Bài giảng Object oriented analysis & Design (OOAD) - Trần Sơn Hải

•Các mô hình phát triển phần mềm

•Mô hình tuyến tính: mô hình thác nước, mô hình prototype

•Mô hình vòng lặp

•Mô hình tăng trưởng

•Quy trình phát triển phần mềm

•Phân tích tính khả thi của dự ánàBản đề xuất

•Phân tích và đặc tả yêu cầuàBản đặc tả

•Thiết kếàTài liệu thiết kế

•Viết mã chương trìnhàMã nguồn

•Kiểm thử phần mềmàdanh sách lỗi

•Triển khai, chạy thử và bảo trìàbiên bản bàn giao và phản hồi

pptx 29 trang thiennv 07/11/2022 3740
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Object oriented analysis & Design (OOAD) - Trần Sơn Hải", để tải tài liệu gốc về máy hãy click vào nút Download ở trên.

File đính kèm:

  • pptxbai_giang_object_oriented_analysis_design_ooad_tran_son_hai.pptx

Nội dung text: Bài giảng Object oriented analysis & Design (OOAD) - Trần Sơn Hải

  1. OOA to OOD
  2. Process Flow for OOD
  3. Phân tích sơ đồ tác vụ Use Case • Tác nhân (Actor) • Tác vụ (Use Case) • Phạm vi (Scope) Ai làm gì?
  4. Phân tích sơ đồ lớp • Lớp: – Tên lớp – Thuộc tính – Phương thức
  5. 2.2 Visibility + - # public private protected Anyone can access No-one can access Subclasses can access Interface operations Data members Operations where sub- classes collaborate Not data members Helper functions Not data members "Friends" are allowd (creates dependency in though off subclass on im- plementation of parent)
  6. Mối quan hệ giữa các lớp • Mối quan hệ giữa các lớp: – Quan hệ Kết hợp • Aggregation • Composition – Quan hệ Tổng quát hóa – Quan hệ Phụ thuộc – Quan hệ Realization – Bản số
  7. Quan hệ kết hợp • Quan hệ Aggregation • Quan hệ Composition Has a
  8. Mối quan hệ tổng quát hóa
  9. Mối quan hệ phụ thuộc và realization • Mối quan hệ phụ thuộc • Mối quan hệ Realization
  10. Bản số 1 : chính xác một 0 1 : từ 0 đến 1 0 * :từ 0 đến nhiều 1 * :từ một đến nhiều
  11. Case study: hệ thống ATM • Xác định các tác nhân • Xác định các tác vụ • Xác định các quan hệ: tác nhân nào sẽ kích họat tác vụ tương ứng gì
  12. Sơ đồ Use Case của hệ thống ATM
  13. Phân tích sơ đồ lớp • Xác định các lớp: – Tên lớp – Thuộc tính – Phương thức – Tầm vực của các thuôc tính và phương thức • Xác định mối quan hệ giữa các lớp – Kết hợp: “has a” – Tổng quát hóa: “is a” – Phụ thuộc – Realization – Bản số
  14. Các lớp trong hệ thống ATM Class Operations Description ATM Show() Displays the location and branch name of the ATM. ATMCard GetPin() Accepts the PIN entered by the customer and verifies it. GetAccount() Fetches the account information based on the card_ID and PIN. SetPin(int) Updates the PIN. Static and Dynamic Modeling Lesson 2A / Slide 24 of 33
  15. Các lớp trong hệ thống ATM BankCustomer InsertCard() Prompts the customer to insert ATM card. SelectTransaction() Select a transaction from a list of transactions. EnterPin() Prompts the customer to enter PIN. ChangePin() Invokes the PIN change request. Enters the new PIN. WithdrawCash() Invokes the cash withdrawal operation. RequestTransactionSummary() Requests for a transaction summary. Static and Dynamic Modeling Lesson 2A / Slide 25 of 33
  16. Các lớp trong hệ thống ATM Account CalculateInterest() Calculates the interest for the account. This is an abstract operation. UpdateAccount() Updates the account information. Verifies if the amount to be VerifiyWithdrawalAmount() withdrawn is less than the account balance amount. CurrentAccount CalculateInterest() Calculates the interest for the current account. Static and Dynamic Modeling Lesson 2A / Slide 26 of 33
  17. Các lớp trong hệ thống ATM SavingsAccount CalculateInterest() Calculates the interest for the savings account Transaction getAccountBalance() Gets the balance of the account. StartTransaction() Initiates the transaction. CancelTransaction Cancels the transaction. CardScanner AcceptCard() Accept/rejects the ATM card. ReadCard() Reads the Card_Id associated with the ATM card. EjectCard() Ejects the ATM card. Static and Dynamic Modeling Lesson 2A / Slide 27 of 33
  18. Các lớp trong hệ thống ATM DisplayScreen Prompt() Prompts the respective screen as per request. AcceptInput() Accepts the required input on the displayed screen. CashDispenser: SupplyCash() Supplies the verified amount as cash. GenerateRecipt() Generates a receipt for the cash dispensed. Static and Dynamic Modeling Lesson 2A / Slide 28 of 33
  19. Sơ đồ lớp của hệ thống ATM