Presentation is loading. Please wait.

Presentation is loading. Please wait.

Other UML Diagramming Techniques CS 124. UML Diagramming Techniques Class Diagrams Use Case Diagrams Interaction Diagrams Sequence diagrams Collaboration.

Similar presentations


Presentation on theme: "Other UML Diagramming Techniques CS 124. UML Diagramming Techniques Class Diagrams Use Case Diagrams Interaction Diagrams Sequence diagrams Collaboration."— Presentation transcript:

1 Other UML Diagramming Techniques CS 124

2 UML Diagramming Techniques Class Diagrams Use Case Diagrams Interaction Diagrams Sequence diagrams Collaboration diagrams State Diagrams Others (e.g., Activity Diagrams, Package Diagrams)

3 State Diagrams Depicts object behavior across use cases State: collection of values of attributes State-behavior relationship state is updated by some behavior carried out Notation States: rounded rectangles Arrows: state transitions Labels on Arrows: event/action/use case

4 Example 1: Book in a Library System New Available Reserved Borrowed start activate return borrow reserve release

5 Example 2: Claim in an Insurance System Pending Approved Rejected Closed start Officer confirms that premium payments made and claim is legitimate Customer disputes evaluation

6 When to Draw State Diagrams State diagrams are good at describing the behavior of an object across several use cases Use state diagrams only for those classes that exhibit interesting behavior, often the main classes of the system

7 State Diagrams Help Complete System Design State diagrams often reveal use cases overlooked in earlier analyses of the system State diagrams provide hints on which attributes are necessary for a given class

8 Activity Diagram Represents sequence of activities Depicts condition, iteration, and parallel activities When to use: Analyzing use cases Alternate way of describing a use case Depicting use case sequences/workflow Describing method behavior

9 Activity Diagram Notation Oval - activity Start and end buttons Links between ovals to depict sequence Diamond – conditional branch and merge Bar – fork and join (concurrent activities)

10 About Activity Diagrams Helps in understanding system behavior, but … it does not provide an object-oriented perspective! Suggestion: just use as a tool to clarify complex sequential/parallel relationships between behavioral components

11 CRC Cards Not really part of the UML But helps in construction of Class Diagrams and Interaction Diagrams CRC: Class-Responsibility-Collaboration Role-playing: Team members represent classes Each member/class holds an index card

12 CRC Cards, continued Team goes through each use case and role-play object interaction Responsibilities (which end up being methods) are noted on the index card Use of an index card is deliberate Responsibilities ought to be evenly distributed across the classes that interact Overloaded classes become immediately apparent

13 CRC Cards and UML Diagrams Role-playing activity for each use case maps directly to interaction diagram construction Each card provide class details (methods) for the class diagram

14 Package Diagrams Systems are often large Can be divided into subsystems In object-oriented contexts, subsystems are packages; packages are groups of classes Package diagrams depict grouping dependencies between packages

15 Package Diagram Notation Folder: Package Dotted arrow between folders: dependency link Two variations Abbreviated: name in folder Detailed: name on folder tab, rectangles representing classes in folder area

16 Summary Use the UML as a communication tool across the different stages of software engineering Diagramming techniques are primarily a design tool but helpful in analysis as well Important to note what stage or perspective (conceptual, specification, implementation) you are in There are correspondences between diagrams with actual code


Download ppt "Other UML Diagramming Techniques CS 124. UML Diagramming Techniques Class Diagrams Use Case Diagrams Interaction Diagrams Sequence diagrams Collaboration."

Similar presentations


Ads by Google