1 / 13

OO Design

OO Design. Roshan Chitrakar. Design Class Diagrams (DCD). DCD provides details of the software classes along with methods. DCDs are created in parallel with interaction diagrams or after them in rare cases.

zavad
Download Presentation

OO Design

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. OO Design Roshan Chitrakar

  2. Design Class Diagrams (DCD) • DCD provides details of the software classes along with methods. • DCDs are created in parallel with interaction diagrams or after them in rare cases. • In practice, the creating the DCD begins with drawing a little of Interaction diagram and making DCDs. Then update Interaction diagram and then update DCDs.

  3. DCD Example

  4. Creating DCDs • Identify software classes • Illustrate them by Class Diagrams • Add Method names • Add Type information • Add Association and Navigability • Add Dependency relationship

  5. Identify Software Classes and Illustrate them by Class diagrams • Scan interaction diagrams and list all the classes • Some of the domain classes may be absent here • Some may appear later in the elaboration phase or when a new requirement is added

  6. Add Method Names Go through the interaction diagrams and make a list of all the messages. Generally, messages coming to a class become methods of the class.

  7. Method Name Issues • The message create • Accessing Methods • Multi-objects • Language dependent syntax

  8. Add Type Information • Types of attributes, Parameters of methods and Return values are specified Note: All information must be added exhaustively if CASE tools will be used for code generation.

  9. Add Associations and Navigability • A role should be given uni-directional capability to navigate from source to target objects of classes. • Navigability usually implies the attribute visibility. (shown by a line and an arrow) • Navigability can also be identified from Interaction diagrams • (p294, Larman) • (p293, Larman)

  10. Association and Navigation

  11. Navigability from Interaction Diagram

  12. Add Dependency • Dependency is illustrated with dashed arrow line (UML notation) • It depicts non-attribute visibility (e.g. parameter, local, global visibility) also. • So, it is recommended when local, parameter or global visibility exist among classes.

  13. Dependency

More Related