Module4 - OOAD Dynamic Model in UML Case Study ATM
Module4 - OOAD Dynamic Model in UML Case Study ATM
Software Engineering
Computer Science
Academic Year 2023/2024
1
ATM Case Study
We are going to look at modeling with UML by using a case study of an Automated
Banking System:
• Clients may take money from their accounts, deposit money or ask for their
current balance.
• All these operations are accomplished using either automatic taller machines
(ATM) or counter tellers.
• Transactions on an account may be done by cheque, standing order or using the
teller machine and card.
• There are two kinds of account: savings accounts and chequing accounts.
• Savings accounts give interest and cannot be accessed by the automatic tellers.
• When a cheque is deposited it must be cleared before the funds can be used by
the depositor.
ATM Case Study: Use Case model
• Object-oriented development methods take a user-oriented approach to system development.
• We identify the users of the system and the tasks that they require the system to perform (functional
analysis). These are the uses cases, or use case modeling.
• UML uses the term actor. An actor is the role played by a user.
• We represent the use cases graphically in a use case diagram:
ü It consists of actors and the use cases with which they are involved.
ü Each use case is given a natural language description.
ü Several other use cases can be added to the diagram.
• A use case documents some behaviour that the actor needs from the system.
• Use cases enable the informal requirements to be reformulated in a more structured manner. The set
of use cases are the set of requirements as seen by the users of the system.
• Object-oriented modelling is primarily concerned with modelling the underlying system. We will not
include here the user (GUI) interface/front-end in the system we are developing. Remember that the
boundaries of the system can change depending on the detail/application of our software system.
ATM Case Study: Questions
• As a first step, we can take our informal requirements and identify the nouns or noun phrases,
i.e. identify the words that potentially represent things in our system.
• Some objects are fairly easy to identify, while others are more difficult. Identifying nouns in
the informal requirements is a good way of identifying domain objects, i.e. objects that
belong to the problem.
• When considering a problem, it is often easier to think initially in terms of objects rather than
classes. Humans tend to think in terms of a Volkswagen car, i.e. an object rather than in terms
of the class Volkswagen car. Remember to translate typical objects or real things into classes.
• You can also identify, in some cases, several classes which are specialisations (subclass) that
can be generalised (superclass) if they have properties in common. You can use the concepts
of OOP learned in Module2 of this course.
ATM Case Study: Class Diagram
• We can now use these classes to build an
initial class diagram in UML.
• Explain the classes of the suggested class diagram on the previous slide:
ü Etc
ATM Case Study: interaction diagrams
• The class diagram shows the static structure of the system, but does not show its dynamic
behaviour, i.e. how objects interact to carry out some task. UML has interaction diagrams
to show how objects can communicate with one another.
• Sequence diagrams in particular, can represent scenarios, i.e. sequences of events which
show a particular system behaviour. Sequence diagrams can be useful to:
ü better understand and specify what may happen in a use case.
ü help us identify the operations offered by each object.
ü help us identify new classes that are required to support the behaviour.
• As interaction diagrams are dealing with behaviour, they are presented in terms of objects
rather than classes (interaction happens through method calls).
• We can also represent actors as objects in a sequence diagram.
• Later in the design phase, we are likely to identify more objects within the system and
interactions between these objects.
ATM Case Study: Sequence diagrams
• The next step is to create sequence diagrams to show
the scenarios that can result from the use cases. Hence
sequence diagrams are developed from use cases.
• Let us now consider one of the use cases: “deposit cash
with counter teller”.
• A customer gives cash to a counter teller. The counter
teller enters the amount and the account number. The
system updates the account and issues a receipt.
• This is a use case very simple and sequence diagram.
• Remember that a class shows the operations offered by
that class. It does not show the operations called by its
objects. We show object calls in a sequence diagram. An
arrow to an object in a sequence diagram shows a call of
an operation offered by the object while an arrow from
the object shows a call made by the object.
ATM Case Study: Sequence diagrams
• Draw and analyze a new sequence diagram corresponding to the use case
“withdraw cash from the ATM”
Represents the interaction between objects in a particular Illustrates the flow of activities or processes within a system,
Purpose
sequence or scenario. including decision points and parallel activities.
Emphasizes the order of messages exchanged among Focuses on the flow of actions or activities within the
Focus
objects over time. system, often showing concurrent and parallel behaviors.
Typically consists of lifelines (representing objects), Utilizes nodes (representing actions or activities), transitions
Notation
messages, and activations. (depicting flow), and decision points (showing branching).
Usually depicts detailed interactions at the level of method Offers a broader view, showcasing high-level processes and
Granularity
calls or system events. activities without intricate method-level detail.
Shows the chronological order of events, with time Does not necessarily represent time explicitly; rather, it
Time Representation
progressing from top to bottom. focuses on the logical flow of activities.
Limited capability for representing decision points, often Allows for explicit representation of decision points, loops,
Decision Making
depicted with combined fragments. and parallel activities using control nodes.
Ideal for modeling cases involving multiple objects and Suited for modeling complex processes, business workflows,
Use Cases their interactions, such as system sequences or or system behaviors involving multiple steps and decision
collaborations. points.
ATM Case Study: Questions
Question 4: Activity Diagram
• The next UML diagram shows a business
process of our system.