1 / 15

Object-Oriented Design (OOD)

Object-Oriented Design (OOD). Aim Design product in terms of objects extracted during OOA If we are using a language without inheritance (C, Ada 83) Use abstract data type design If we are using a language without a type statement (FORTRAN, COBOL) Use data encapsulation.

caitir
Download Presentation

Object-Oriented Design (OOD)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Object-Oriented Design (OOD) • Aim • Design product in terms of objects extracted during OOA • If we are using a language without inheritance (C, Ada 83) • Use abstract data type design • If we are using a language without a type statement (FORTRAN, COBOL) • Use data encapsulation Lecture 16 & 17

  2. Object-Oriented Design Steps • OOD consists of four steps: • 1. Construct interaction diagrams for each scenario • 2. Construct the detailed class diagram • 3. Proceed to the detailed design Lecture 16 & 17

  3. Elevator Problem: OOD • Step 1. Construct interaction diagrams for each scenario • Sequence diagrams • Collaboration diagrams • Both show the same thing • Objects and messages passed between them • But in a different way Lecture 16 & 17

  4. Elevator Problem: OOD (contd) • Normal scenario Lecture 16 & 17

  5. Elevator Problem: OOD (contd) • Sequence diagram Lecture 16 & 17

  6. Collaboration Diagram • Collaboration diagram Lecture 16 & 17

  7. Elevator Problem: OOD (contd) • Step 2. Construct Detailed Class Diagram • Do we assign an action to a class or to a client of that class? • Criteria • Information hiding • Reducing number of copies of action • Responsibility-driven design • Examples close doors is assigned to Elevator Doors move one floor down is assigned to Elevator Lecture 16 & 17

  8. Elevator Problem: OOD (contd) • Detailed class diagram Lecture 16 & 17

  9. Elevator Problem: OOD (contd) • Step 3. Perform detailed design • Detailed design of methodelevator controller loop Lecture 16 & 17

  10. Air Gourmet Case Study: Object-Oriented Design • OOD consists of three steps: • 1. Construct interaction diagrams for each scenario • 2. Construct the detailed class diagram • 3. Proceed to the detailed design Lecture 16 & 17

  11. Step 1. Interaction Diagrams • Extended scenario for making a reservation Lecture 16 & 17

  12. Step 1. Interaction Diagrams (contd) • Sequence diagram for making a reservation Lecture 16 & 17

  13. Step 1. Interaction Diagrams (contd) • Collaboration diagram for sending and returning a postcard Lecture 16 & 17

  14. Step 2. Detailed Class Diagram C++ Version Java Version Lecture 16 & 17

  15. Step 3. Detailed Design • The detailed design can be found in • Appendix H (for implementation in C++) • Appendix I (for implementation in Java) Lecture 16 & 17

More Related