280 likes | 618 Views
Design and Use-case Realization. Software Engineering Laboratory Fall 2006. Outline. UML related issues. Class Diagram. Interaction Diagrams. Use-case Realization. Use-Case Realization Report. An Example (Login) SEPID - Design. UML related issues. Class Diagram:
E N D
Design and Use-case Realization Software Engineering Laboratory Fall 2006 Sharif University of Technology
Outline • UML related issues. • Class Diagram. • Interaction Diagrams. • Use-case Realization. • Use-Case Realization Report. • An Example (Login) • SEPID - Design Sharif University of Technology
UML related issues • Class Diagram: • The diagrams describing the classes and relationships that participate in the realization of the use case. • Interaction Diagrams: • The diagrams (sequence and collaboration diagrams) describing how the use case is realized in terms of collaborating objects. Sharif University of Technology
Class Diagrams • A class diagram describes the types of objects in the system and the various kinds of relationships that exist among them. • Class diagrams also show the attributes and operations of a class and the constraints that apply to the way objects are connected. Sharif University of Technology
Classes in UML Sharif University of Technology
Relationships (Dependency) • A dependency is a using relationship that states that a change in specification of one thing may affect another thing that uses it, but not necessarily the reverse. • Some source of dependency: • Using methods of other class • Using other class as argument of methods • Throwing exception Sharif University of Technology
Relationships (Generalization) • one thing is-a-kind-of a more general thing. • Generalization at the implementation perspective is associated with inheritance in programming languages. Sharif University of Technology
Relationships (Association ) • An association is a structural relationship that specifies that objects of one thing are connected to objects of another. • Association can have Multiplicity • Types of association: • Aggregation • Composition Sharif University of Technology
Aggregation and Composition • Aggregation is the part-of relationship. but the part object can exists alone. • composition is also part of relationship, but the part object may belong to only one whole Sharif University of Technology
Interaction Diagrams • Types of interaction diagrams: Sequence diagrams and collaboration diagrams. • Sequence diagrams show the explicit sequence of messages and are better when it is important to visualize the time ordering of messages. • Collaboration diagrams show the communication links between objects and are better for understanding all of the effects on a given object and for algorithm design. Sharif University of Technology
Sequence Diagram Sharif University of Technology
Collaboration Diagram Sharif University of Technology
Use-case Realization • represents the design perspective of a use case. • A use-case realization describes how a particular use case is realized within the design model, in terms of collaborating objects. Sharif University of Technology
Some Points • Use case realization typically has two parts: • express the structure of the use case • express the behavior of the use case. In other words it shows the flow of events in a use case • A use-case can be realized in different ways • The use-case realization completely realizes the selected sub-flows of the use case; there is no missing behavior. • All required behavior has been unambiguously distributed among the model elements participating in the use-case realization. Sharif University of Technology
Some Points (cont.) • The Flow of Events Design should be readable and suit its purpose. • The diagrams describing the use-case realization should be readable and suit their purpose. • Where several diagrams illustrate the use-case realization, the role of each is clear, and the diagrams are consistent with one another. • All exceptional cases to be considered in the current iteration have been handled. Sharif University of Technology
Use-Case Realization Report • Brief Description • A Brief Description of the realized use case. • Flow of Events Design • A Flow of Events Design of the use-case realization. • Interaction Diagrams • Interaction Diagrams of the use-case realization. • Participating Objects • Objects participating in interaction diagrams of the use-case realization. For each object, its class and brief description. • Class Diagrams • Class Diagrams of the use-case realization. • Derived Requirements • Derived Requirements of the use-case realization. Sharif University of Technology
An Example (Login) • Consider we want to realize login use-case of a system. • Login: User can enter to system after entering its username and password correctly. • At first we try to specify the structure of Login Use-case. Sharif University of Technology
An Example (Cont.) Class diagram Sharif University of Technology
An Example (Cont.) Sequence diagram Sharif University of Technology
Thanks References: RUP documents, The UML User Guide, UML Distilled. Sharif University of Technology