Uml Lab Manual
Uml Lab Manual
Uml Lab Manual
JAIPUR
with PO
INTERNAL: 45 Marks
EXTERNAL: 30 Marks
For assessment of work done during mid semester the Internal marks (60% component) is to be
distributed under the following heads:
Introduction of UML
The Unified Modeling Language (UML) is a standard visual modeling language intended to be
used for
modeling business and similar processes,
analysis, design, and implementation of software-based systems
UML is a common language for business analysts, software architects and developers used to
describe, specify, design, and document existing or new business processes, structure and
behavior of artifacts of software systems.
UML can be applied to diverse application domains (e.g., banking, finance, internet, aerospace,
healthcare, etc.) It can be used with all major object and component software development
methods and for various implementation platforms (e.g., J2EE, .NET).
UML is a standard modeling language, not a software development process. UML 1.4.2
Specification explained that process:
provides guidance as to the order of a teams activities,
specifies what artifacts should be developed,
directs the tasks of individual developers and the team as a whole, and
offers criteria for monitoring and measuring a projects products and activities.
UML is intentionally process independent and could be applied in the context of different
processes. Still, it is most suitable for use case driven, iterative and incremental development
processes. An example of such process is Rational Unified Process (RUP).
UML is not complete and it is not completely visual. Given some UML diagram, we can't be
sure to understand depicted part or behavior of the system from the diagram alone. Some
information could be intentionally omitted from the diagram, some information represented on
the diagram could have different interpretations, and some concepts of UML have no graphical
notation at all, so there is no way to depict those on diagrams.
For example, semantics of multiplicity of actors and multiplicity of use cases on use case
diagrams is not defined precisely in the UML specification and could mean either concurrent or
successive usage of use cases.
Name of an abstract classifier is shown in italics while final classifier has no specific graphical
notation, so there is no way to determine whether classifier is final or not from the diagram.
VERSIONS OF UML
1.3 03-2000 Contains a number of changes to the UML metamodel, semantics, and
notation, but should be considered a minor upgrade to the original
proposal.
1.4 09-2001 Mostly "tuning" release but not completely upward compatible with the
UML 1.3. Addition of profiles as UML extensions grouped together.
Updated visibility of features. Stick arrowhead in interaction diagrams now
denotes asynchronous call. Model element may now have
multiple stereotypes. Clarified collaborations. Refined definitions of
components and related concepts. Artifact was added to represent physical
representations of components.
1.5 03-2003 Added actions - executable actions and procedures, including their run-
time semantics, defined the concept of a data flow to carry data between
actions, etc.
1.4.2 01-2005 This version was accepted as ISO specification (standard) ISO/IEC 19501.
UML 1.5 was released 2 years before.
2.0 08-2005 New diagrams: object diagrams, package diagrams, composite structure
diagrams, interaction overview diagrams, timing diagrams, profile
diagrams. Collaboration diagrams were renamed to communication
diagrams.
2.2 02-2009 Fixed numerous minor consistency problems and added clarifications to
UML 2.1.2
2.3 05-2010 Minor revision to the UML 2.2, clarified associations and association
classes, added final classifier, updated component diagrams, composite
structures, actions, etc.
2.4.1 08-2011 UML revision with few fixes and updates to classes, packages - added URI
package attribute; updated actions; removed creation event, execution
event, send and receive operation events, send and receive signal events,
2.5 06-2015 UML 2.5 is called a "minor revision" to the UML 2.4.1, while they spent a
lot of efforts to simplify and reorganize UML specification document. The
UML specification was re-written "to make it easier to read". For example,
they tried to "reduce forward references as much as possible".
Class Shows structure of the designed system, subsystem class, interface, feature,constraint
diagram or component as related classes and interfaces, with , association,generalization, depe
their features, constraints and relationships - ndency.
associations, generalizations, dependencies, etc.
Model UML auxiliary structure diagram which shows Model, package, packageable
diagram some abstraction or specific view of a system, to element, dependency.
describe architectural, logical or behavioral aspects
of the system. It could show, for example,
architecture of a multi-layered (aka multi-tiered)
application - see multi-layered application model.
Collaborati Shows objects in a system cooperating with each Collaboration, connector, part,
on use other to produce some behavior of the system. dependency.
diagram
Profile Auxiliary UML diagram which allows to define profile, metaclass, stereotype,exte
diagram custom stereotypes, tagged values, and constraints nsion, reference, profile
as a lightweight extension mechanism to the UML application.
standard. Profiles allow to adapt the UML
metamodel for different platforms (such as J2EE or
.NET), or domains (such as real-time or business
process modeling).Profile diagrams were first
introduced in UML 2.0.
Use case Describes a set of actions (use cases) that some Usecase, Actor,subject,
diagram system or systems (subject) should or can perform in extend, include,
collaboration with one or more external users of the association.
system (actors) to provide some observable and
Activity Shows sequence and conditions for coordinating Activity, partition, actio
diagram lower-level behaviors, rather than which classifiers n,
own those behaviors. These are commonly object, control, activity
called control flow and object flow models. edge.
sequence diagrams,
communication diagrams (known as collaboration
Interaction Defines interactions through a variant of activity initial node, flow final
overview diagrams in a way that promotes overview of the node, activity final
diagram control flow. Interaction overview diagrams focus on node, decision node,
the overview of the flow of control where the nodes merge node, fork node
are interactions or interaction uses. The lifelines and , join node, interaction,
the messages do not appear at this overview level. interaction use, duration
constraint, time
constraint.
mapping
History
The idea of out-of-hours cash distribution developed from bankers' needs in Asia (Japan),
Europe (Sweden and the United Kingdom) and North America (the United States).Little is
known of the Japanese device other than it was called "Computer Loan Machine" and supplied
cash as a three-month loan at 5% p.a. after inserting a credit card. The device was operational in
1966.
In the US patent record, Luther George Simjian has been credited with developing a "prior art
device". Specifically his 132nd patent (US3079603), which was first filed on 30 June 1960 (and
granted 26 February 1963). The roll-out of this machine, called Bankograph, was delayed by a
couple of years, due in part to Simjian's Reflectone Electronics Inc. being acquired by Universal
Match Corporation.An experimental Bankograph was installed in New York City in 1961 by
the City Bank of New York, but removed after six months due to the lack of customer
acceptance. The Bankograph was an automated envelope deposit machine (accepting coins, cash
and cheques) and did not have cash dispensing features.
Actor Reg Varney using the world's first cash machine in Enfield Town, north London on 27
June 1967
The idea of a PIN stored on the card was developed by a British engineer working on the MD2
named James Goodfellow in 1965 (patent GB1197183 filed on 2 May 1966 with Anthony
Davies). The essence of this system was that it enabled the verification of the customer with the
debited account without human intervention. This patent is also the earliest instance of a
complete "currency dispenser system" in the patent record. This patent was filed on 5 March
1968 in the US (US 3543904) and granted on 1 December 1970. It had a profound influence on
the industry as a whole. Not only did future entrants into the cash dispenser market such as NCR
Corporation and IBM licence Goodfellows PIN system, but a number of later patents reference
this patent as "Prior Art Device". Cash machines are placed not only near or inside the premises
Global use
There are no hard international or government-compiled numbers totaling the complete number
of cash machines in use worldwide. Estimates developed by ATMIA place the number of cash
machines in use currently at more than 2.2 million, or approximately 1 cash machine per 3000
people in the world.
To simplify the analysis of cash machine usage around the world, financial institutions generally
divide the world into seven regions, due to the penetration rates, usage statistics, and features
deployed. Four regions (USA, Canada, Europe, and Japan) have high numbers of cash machines
per million people. Despite the large number of cash machines, there is additional demand for
machines in the Asia/Pacific area as well as in Latin America. Cash machines have yet to reach
high numbers in the Near East and Africa.
The world's most southerly installed cash machine is located at McMurdo Station, located
in New Zealand's Ross Dependency, in Antarctica since 1997. There are two cash machines at
McMurdo, but only one active at any time, that are owned by Wells Fargo and serviced once
every two years by NCR.
Cash machines are ubiquitous on modern cruise ships and also can be found on some US
Navy ships.
Hardware
A cash machine is typically made up of the following devices:
Software
With the migration to commodity Personal Computer hardware, standard commercial "off-
the-shelf" operating systems and programming environments can be used inside of cash
machines. Typical platforms previously used in cash machine development
include RMX or OS/2.
Today, the vast majority of cash machines worldwide use a Microsoft Windows operating
system, primarily Windows XP Professional or Windows XP Embedded. A small number of
deployments may still be running older versions of the Windows OS, such as Windows
NT, Windows CE, or Windows 2000.
There is a computer industry security view that general public desktop operating systems (os)
have greater risks as operating systems for cash dispensing machines than other types of
operating systems like (secure) real-time operating systems (RTOS). RISKS Digest has many
articles about cash machine operating system vulnerabilities.
Linux is also finding some reception in the cash machine marketplace. An example of this
is Banrisul, the largest bank in the south of Brazil, which has replaced the MS-DOS operating
systems in its cash machines with Linux. Banco do Brasil is also migrating cash machines to
Linux. Indian-based Vortex Engineering is manufacturing cash machines which operate only
with Linux. Common application layer transaction protocols, such as Diebold 91x (911 or 912)
and NCR NDC or NDC+ provide emulation of older generations of hardware on newer platforms
with incremental extensions made over time to address new capabilities, although companies like
NCR continuously improve these protocols issuing newer versions (e.g. NCR's AANDC v3.x.y,
where x.y are subversions). Most major cash machine manufacturers provide software packages
ATM Card
An ATM card is any payment card issued by a financial institution that enables a customer to
access an automated teller machine (ATM) in order to perform transactions such as deposits,
cash withdrawals, obtaining account information, etc. ATM cards are known by a variety of
names such as bank card, MAC (money access card), client card, key card or cash card, among
others. Most payment cards, such as debit and credit cards can also function as ATM cards,
although ATM-only cards are also available. Charge and proprietary cards cannot be used as
ATM cards. The use of a credit card to withdraw cash at an ATM is treated differently to
a POS transaction, usually attracting interest charges from the date of the cash
withdrawal. Interbank networks allow the use of ATM cards at ATMs of private operators and
financial institutions other than those of the institution that issued the cards.
ATM cards can also be used on improvised ATMs such as "mini ATMs", merchants' card
terminals that deliver ATM features without any cash drawer. These terminals can also be used
as cashless scrip ATMs by cashing the receipts they issue at the merchant's point of sale. The
size of ATM cards is 85.60 mm 53.98 mm (3.370 in 2.125 in) and rounded corners with a
radius of 2.883.48 mm, in accordance with ISO/IEC 7810#ID-1, the same size as other payment
cards, such as credit, debit and other cards. They also have an embossed bank card
number conforming to the ISO/IEC 7812 numbering standard.
All ATM machines, at a minimum, will permit cash withdrawals of customers of the machine's
owner (if a bank-operated machine) and for cards that are affiliated with any ATM network the
PO Mapping :-
PO a b c d e f g h i j k l m
mapping
Design a Use Case Diagram for ATM System & Describe in Detail.
A withdrawal transaction asks the customer to choose a type of account to a dollar amount from
a menu of possible amounts. The system verifies that it has sufficient money on hand to satisfy
the request before sending the transaction to the bank. (If not, the customer is informed and
asked to enter a different amount.) If the transaction is approved by the bank, the appropriate
amount of cash is dispensed by the machine before it issues a receipt. (The dispensing of cash is
also recorded in the ATM's log.)
A deposit transaction asks the customer to choose a type of account to deposit to (e.g. checking)
from a menu of possible accounts, and to type in a dollar amount on the keyboard. The
transaction is initially sent to the bank to verify that the ATM can accept a deposit from this
customer to this account. If the transaction is approved, the machine accepts an envelope from
the customer containing cash and/or checks before it issues a receipt. Once the envelope has been
received, a second message is sent to the bank, to confirm that the bank can credit the customer's
account - contingent on manual verification of the deposit envelope contents by an operator later.
(The receipt of an envelope is also recorded in the ATM's log.) A deposit transaction can be
cancelled by the customer pressing the Cancel key any time prior to inserting the envelope
containing the deposit. The transaction is automatically cancelled if the customer fails to insert
the envelope containing the deposit within a reasonable period of time after being asked to do so.
Transfer Transaction Use Case
A transfer transaction asks the customer to choose a type of account to transfer from (e.g.
checking) from a menu of possible accounts, to choose a different account to transfer to, and to
type in a dollar amount on the keyboard. No further action is required once the transaction is
approved by the bank before printing the receipt.
An invalid PIN extension is started from within a transaction when the bank reports that the
customer's transaction is disapproved due to an invalid PIN. to the bank again. If the bank
now approves the transaction, or disapprove sit for some other reason, the original use case
is continued; otherwise the process of re-entering the PIN is repeated. Once the PIN is
successfully re-entered, it is used for both the current transaction and all subsequent
transactions in the session. If the customer fails three times to enter the correct PIN, the card
is permanently retained, a screen is displayed informing the customer of this and suggesting
he/she contact the bank, and the entire customer session is aborted.
PO a b c d e f g h i j k l m
mapping
The basic structure of the class diagram arises from the responsibilities and relationships
discovered when doing the CRC cards and Interaction Diagrams. (If a class uses another class as
a collaborator, or sends a message to an object of that class during an Interaction, then there must
either be an association linking objects of those classes, or linking the "sending" class to an
object which provides access to an object of the "receiving" class.)
In the case of the ATM system, one of the responsibilities of the ATM is to provide access to its
component parts for Session and Transaction objects; thus, Session and Transaction have
associations to ATM, which in turn has associations to the classes representing the individual
component parts. (Explicit "uses" links between Session and Transaction, on the one hand, and
the component parts of the ATM, on the other hand, have been omitted from the diagram to
avoid making it excessively cluttered.)
The need for the various classes in the diagram was discovered at various points in the design
process.
Some classes were discovered when doing detailed design or writing code
That is, OO design is not a "waterfall" process - discoveries made when doing detailed design
and coding can impact overall system design.
PO a b c d e f g h i j k l m
mapping
Three of the objects we have identified have behavior that is sufficiently complex to warrant
developing a State Chart for them. (These are the objects that were identified as the major
controller objects.)
The object representing the machine itself (responsible for the System Startup and
Shutdown use cases)
Objects representing a customer session (one per session) (responsible for the Session use
case)
Objects representing an individual transaction (one per transaction) (responsible for the
Transaction use case, use cases for the specific types of transaction, and Invalid PIN
extension).
PO a b c d e f g h i j k l m
mapping
We have two types of interaction diagrams in UML. One is sequence diagram and the
other is a collaboration diagram. The sequence diagram captures the time sequence of message
flow from one object to another and the collaboration diagram describes the organization of ob-
jects in a system taking part in the message flow.
Purpose:
1. To capture dynamic behaviour of a system.
PO a b c d e f g h i j k l m
mapping
mapping
Activity diagram is basically a flow chart to represent the flow form one activity to another . The
activity can be described as an operation of the system. So the control flow is drawn from one
operation to another. This flow can be sequential, branched or concurrent. Ac-tivity diagrams
deals with all type of flow by using elements like fork, join etc.
Contents
Initial/Final State , Activity , Fork & Join , Branch , Swim lanes
Fork
A fork represents the splitting of a single flow of control into two or more concur-rentFlow of
control. A fork may have one incoming transition and two or more outgoing transi-tions, each of
which represents an independent flow of control. Below fork the activities asso-ciated with each
of these path continues in parallel.
Join
A join represents the synchronization of two or more concurrent flows of control. A join may
have two or more incoming transition and one outgoing transition. Above the join the activ-ities
associated with each of these paths continues in parallel.
Branching
A branch specifies alternate paths takes based on some Boolean expression Branch is represented
by diamond Branch may have one incoming transition and two or more outgoing one on each
outgoing transition, you place a Boolean expression shouldnt overlap but they should cover all
possibilities.
Swim lane:
Swim lanes are useful when we model workflows of business processes to partition the activity
states on an activity diagram into groups. Each group representing the business organization
responsible for those activities , these groups are called Swimlanes .
mapping
Component diagrams are different in terms of nature and behaviour. Component diagrams are
used to model physical aspects of a system. Now the question is what are these physical
aspects? Physical aspects are the elements like executables, libraries, files, documents etc which
resides in a node. So component diagrams are used to visualize the organization and
relationships among components in a system. These diagrams are also used to make executable
systems.
Component diagram is a special kind of diagram in UML. The purpose is also different from all
other diagrams discussed so far. It does not describe the functionality of the system but it
describes the components used to make those functionalities. So from that point component
diagrams are used to visualize the physical components in a system. These components are
libraries, packages, files etc. Component diagrams can also be described as a static
implementation view of a system. Static implementation represents the organization of the
components at a particular moment. A single component diagram cannot represent the entire
system but a collection of diagrams are used to represent the whole.
These diagrams show the physical components of a system. To clarify it, we can say that
component diagrams describe the organization of the components in a system. Organization can
be further described as the location of the components in a system. These components are
organized in a special way to meet the system requirements. As we have already discussed those
components are libraries, files, executables etc. Now before implementing the application these
components are to be organized. This component organization is also designed separately as a
PO a b c d e f g h i j k l m
mapping
Deployment diagrams are used to visualize the topology of the physical components of a system
where the software components are deployed. So deployment diagrams are used to describe the
static deployment view of a system. Deployment diagrams consist of nodes and their
relationships. The name Deployment itself describes the purpose of the diagram. Deployment
diagrams are used for describing the hardware components where software components are
deployed. Component diagrams and deployment diagrams are closely related. Component
diagrams are used to describe the components and deployment diagrams shows how they are
deployed in hardware.
UML is mainly designed to focus on software artifacts of a system. But these two diagrams are
special diagrams used to focus on software components and hardware components. So most of
the UML diagrams are used to handle logical components but deployment diagrams are made to
focus on hardware topology of a system. Deployment diagrams are used by the system
engineers.
Deployment diagram represents the deployment view of a system. It is related to the component
diagram. Because the components are deployed using the deployment diagrams. A deployment
diagram consists of nodes. Nodes are nothing but physical hardwares used to deploy the
application. Deployment diagrams are useful for system engineers. An efficient deployment
diagram is very important because it controls the following parameters
Performance
Maintainability
Portability
Nodes
PO a b c d e f g h i j k l m
mapping
1. Dependencies,
2. Generalization, and
3. Association.
Generalization is relationships specified in the class subclass scenario, it is shown when one
entity inherits from other.
Associations are structural relationships that are:
1. Class diagram,
2. Object diagram,
3. Component Diagram,
4. Deployment diagram.
Extend and Include define relationships between use cases. Below figure Extend and
Include shows how these two fundamentals are implemented in a project. The below use case
represents a system which is used to maintain customer. When a customer is added successfully
it should send an email to the admin saying that a new customer is added. Only admin have
rights to modify the customer. First lets define extend and include and then see how the same fits
in this use case scenario.
Include: Include relationship represents an invocation of one use case by the other. If you
think from the coding perspective its like one function been called by the other function.
Extend: This relationship signifies that the extending use case will work exactly like the
base use case only that some new steps will inserted in the extended use case.
Scenario: A scenario is a sequence of events which happen when a user interacts with the
system.
Actor: Actor is the who of the system, in other words the end user.
Use Case: Use case is task or the goal performed by the end user. Below figure Use
Case shows a simple scenario with Actor and a Use Case. Scenario represents an
accountant entering accounts data in the system. As use cases represent action performed
they are normally represented by strong verbs.
In this Association there are two types mainly Aggregation Association and Composition
Association.
Aggregation Association signifies that the child objects can exist without the Aggregated Object.
Composition on the other hand represents a strict "has a" relationship wherein child objects are
tightly bound to the parent class and life of its instance depends upon lifetime of top level class
instance. For example say we have three classes University class, Department class and the
Professor Class. The Department cannot exist without university which means that if University
is closed the Department will also be closed. In other words lifetime of the Department depend
on the lifetime of University. This is an example of composition. On the other hand instances of
Professor class can continue to exist even if a Department is shutdown representing and
aggregation association with Department class.