Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object-Orientated Analysis, Design and Programming

Similar presentations


Presentation on theme: "Object-Orientated Analysis, Design and Programming"— Presentation transcript:

1 Object-Orientated Analysis, Design and Programming
Presentation by Dr. Phil Legg Senior Lecturer Computer Science 5: Interaction Modelling Autumn 2016

2 Interaction Modelling
An interaction is a set of messages exchanged within a collaboration. We use interaction diagrams to capture the behaviour of objects at runtime. UML interaction diagrams including sequence and communication diagrams.

3 Use cases, class diagrams and interaction modelling
A use-case consists of related scenarios, e.g. purchase product includes: where I pay by cash, I pay with a credit card and my card is declined. The classes in the class diagram are the building blocks that are available to us to implement the functionality described in the use-case descriptions. To model the dynamic runtime interactions we work through each use case and identify exactly what messages classes will need to send each other in order to implement the required behaviour.

4 Interaction modelling process
Use cases control the way in which the interactions between the objects are modelled The internal behavior of each use case is analyzed to help the understanding of the interactions between objects of different classes. New class responsibilities or new classes may be identified. The class diagrams must be further reviewed to identify any additional associations between classes which are implied by the interactions. The process is repeated for each use case to be modelled.

5 Message Passing The messaging between objects defines the interaction, the collaboration and control. An object can only be accessed by sending a message to its public interface These published services are performed by the receiving object, not the sending one. A message has a signature, being the required information to perform the service and the information delivered as a response.

6 Data may be passed as parameters
(Method, function, and operation, may be used interchangeably!)

7 Use case and classes drive interaction modelling
The use-cases will define the business services that the system must provide. Use-cases do not however define or describe how this will be achieved. The class diagram is the static view of the required system. The class diagram presents the building blocks (classes) and illustrates which classes interact but does not define how they interact. The interaction model defines the way in which services are provided by the objects within the system Interaction modelling integrates the class model and the use cases.

8 UML Interaction Diagrams
Communication Diagrams: emphasize the links between the various participants and represent the object interaction for chosen threads within the required system. Sequence Diagrams: emphasize the time ordering of messages and model the object interactions

9 What is the sequence of activity?
How actors interact with the system What is the sequence of activity?

10 What is the sequence of activity?
How actors send messages What is the sequence of activity?

11 Sequence Diagram syntax

12 In-Class Activity Create a sequence diagram for the add film use case in the UWEfilm case study.

13 What is the sequence of activity?
Communication Diagram What is the sequence of activity?

14 In-Class Activity Create a sequence diagram for the UWEfilm Customer actor use case “Purchase Advance Tickets”

15 Summary An interaction is a set of messages exchanged within a collaboration. Interaction diagrams describe how groups of objects collaborate in some behaviour. The use case defines WHAT is required of the system, but not HOW. The classes in the class diagram are the building blocks that are available to us to implement the functionality described in the use-case descriptions.


Download ppt "Object-Orientated Analysis, Design and Programming"

Similar presentations


Ads by Google