Use Case Model (Diagram) by undul855

VIEWS: 56 PAGES: 6

									Interaction Diagrams


Are of two types:

   Collaboration Diagrams
   Design Sequence Diagrams

You can develop one from the other




                                     1
Object-Oriented Program Design

Learnt step-by-step approach to object-oriented program
design – the central activity is assigning responsibilities (the
operations which implement them) to software objects.

This activity is based on an approach called design by contract.
It uses a set of patterns to guide the design decisions/process.




                                                                   2
Interaction Diagrams

The system operation contracts produced during the final step
in object-oriented analysis are the starting point for object-
oriented program design.

Each system operation is invoked by an input with the same
name as the system operation.

For each system operation the objects within the business layer
collaborate to check that the preconditions of the contract are
true and to cause the post-conditions of the contract to become
true.

The relevant portion of the domain model suggests which
objects are candidates for participating in the collaboration.

The designer applies the patterns to produce an interaction
diagram (collaboration diagram or design sequence diagram)
for each system operation.

Each interaction diagram is a dynamic model of the system’s
internal response to the associated input.




                                                                 3
Fundamental Object-Oriented Concepts

Object
    (a unique identity,
    a set of attributes, and
    a set of operations)

Class
     (is a group of objects having an identical set of attributes
     and an identical set of operations)

Message
    (is a request from one object to a second object to carry
    out an operation belonging to the second object)

Message
    (specifies the identity of the object to which it is sent, the
    name of the operation and, possibly, the parameters
    associated with the message)

A responsibility is an obligation of an object to other objects.

A behavior is the task carried out by an operation. It focuses
on what the operation must do rather than on the algorithm
accomplishing the task.

In UML, an operation is a service which can be requested from
an object.

An operation has a signature, consisting of the operation’s
name, its parameters, and the type of what it returns.

An operation is invoked by a message with the same name as
that of the operation.


                                                                     4
Patterns for Object-Oriented Software Design
(Figure 8.4, p. 225)

Façade pattern – responsible for handling a system operation
message from an actor

Creator pattern – responsible for requesting the creation of a
new object

B asks A to create an object when:
   B has initializing data which will be passed to A when it is
     created
   B contains objects of class A
   B records instances of objects of class A
   B closely uses objects of class A
   Objects of class A are part of objects of class B

Expert pattern – assignment of responsibility to a class that
has the information needed to fulfill it (i.e. where is the data
located to carry out the responsibility)




                                                                   5
Design Sequence Diagram

Use the format of Figure 8.42 on page 253 to develop a design
sequence diagram of the use case Register for Classes of the
university registration system case.

Use the following as input information to the development of
the above design sequence diagram;
    Figure 8.27 on page 244
    Figure 8.33 on page 247
    Figure 8.38 on page 250




                                                                6

								
To top