Uml Finalized
Uml Finalized
WHAT IS UML?
The Unified Modeling Language (UML) is a standard language for writing software
blueprints. The UML is a language for
- Visualizing
- Specifying
- Constructing
- Documenting
the artifacts of a software-intensive system.
The UML is appropriate for modeling systems ranging from enterprise information
systems to distributed Web-based applications and even to hard real time embedded systems.
IMPORTANCE OF MODELING
1) If we want to build a dog house, with a little planning, we’ll likely end up with a dog
house that’s reasonably functional and we can do it with no one’s help.
2) If we want to build a house for a family, it’s going to take a lot longer. In this case we need
some detailed planning; we’ll need to draw some blueprints, before we lay the foundation. 3) If
we want to build a high-rise office building, we’ll have to do extensive planning; and we need all
sorts of blueprints and models to communicate with one another.
WHAT IS A MODEL
A Model is a simplification of reality.
We build models so that we can better understand the system we are developing.
We build models of complex systems because we cannot comprehend such a system in its
entirety.
Through Modeling, we achieve four aims
1. Models help us to visualize a system as it is or as we want it to be.
2. Models permit us to specify the structure or behavior of a system.
3. Models give us a template that guides us in constructing a system.
4. Models document the decisions we have made.
1
ARCHITECTURE OF UML
2) Design view:
It contains classes, collaborations and interfaces. This view supports the functional
requirements of the system. The static aspects of this view are captured in Class diagrams and
Object diagrams.
2
3) Process view:
It contains threads and processes that form the systems concurrency and synchronization
mechanisms. This view focuses on the performance, scalability and throughput of the system.
The static aspects of this view are captured in Class diagrams and Object diagrams.
4) Implementation view:
It contains components and files that are used to assemble and release the physical
system. This view focuses on the configuration management of the system. The static aspects of
this view are captured in Component diagram.
5) Deployment view:
It contains the nodes that form the system hardware topology. This view focuses on
distribution, delivery and installation of the parts that make the physical system. The static
aspects of this view are captured in Deployment diagram.
The dynamic aspects of all the above mentioned vies are captured in Interaction, Activity
and State chart diagrams.
BASIC BUILDING BLOCKS
There are 3 kinds of basic building blocks
1. Things
2. Relationships
3. Diagrams
THINGS
There are 4 kinds of things in the UML
i. Structural Things
ii. Behavioral Things
iii. Annotational Things
iv. Grouping Things
Structural Things
Structural Things are nouns of UML models. There are 7 kinds of Structural things
Class: A class is a set of objects that share the same attributes, operations, relationships and
semantics.
3
Class Name
Attributes
Operations()
ISpelling
Use Case: Use Case describes set of sequence of actions that a system performs that yields an
observable result of value to a particular actor.
UseCase
Actor
Active Class: Active class is just like a class but its elements are connected to other class
elements.
Component
Node: A Node is physical element that exists at run-time and having at least some memory and
processing capability.
4
Node
Behavioral Things
Behavioral Things are the verbs of UML representing behavior over time and space. There are 2
kinds of Behavioral things.
Interaction: Interaction is used to show communication between two objects.
Annotational Things
Grouping Things
Package
RELATIONSHIPS
5
Dependency is a relationship between two things in which a change to one thing (Independent
thing) may affect the other thing (Dependent thing).
MovieClip
name
Channel
Dependency
screen()
start()
stop()
Generalization: It is denoted by a solid line with a hollow arrow head pointing to the parent
Generalization is a relationship in which the child will share the behavior of the parent.
Shape
origin : Integer
display()
Rectangle Circle
length : Integer radius : Integer
breadth : Integer
6
Realization is a relationship between classifiers, where one classifier specifies a contract that
another classifier guarantees to carry out
DIAGRAMS
There are 9 types of Diagrams in UML, which are classified into 2 types
Structural Diagrams (static diagrams)
These are of 4 types
Class Diagram: A Class diagram shows a set of classes, interfaces, and collaborations and their
relationships. A class consists of class name, attributes, operations and responsibilities.
College
Department
name : String
location : String D_name : String
D_code : Integer
collect fees()
recruit faculty()
Staff
S_name : String
7
Object Diagram: An Object diagram shows a set of objects and their relationships. They
represent snapshots of instances of the things found in class diagrams.
C: College
D: Department
name = "B.V.R.I.T"
location = "Narsapur" D_name = "CSE"
D_code : Integer = 05
collect fees()
recruit faculty()
S: Staff
S_name = "xyz"
Component Diagram: A Component diagram shows the organizations and dependencies among
a set of components.
8
Interaction Diagrams: An Interaction diagram shows an interaction, consisting of a set of
objects and their relationships, including the messages they exchange among them.
Two types of Interaction diagrams are:
Sequence Diagram: A Sequence diagram is an interaction diagram that emphasizes the time-
ordering of messages. To show interaction between objects we use 3 types of messages.
Simple Messages:
A Simple message shows how control is passed from one object to other without describing
communication in detail i.e. without indicating whether it is synchronous or asynchronous
message.
Synchronous Messages:
If sender object waits for a reply from receiver object from destination, such messages are called
Synchronous messages. Here, only one object can send a message at a given instance of time.
Asynchronous Messages:
If sender object continues executing while target is processing the message then such messages
are said to be Asynchronous messages. Here, multiple messages are executed at a time.
Object Lifeline: An Object life line is vertical dashed lines that represent the existence of an
object over a period of time.
9
Focus of Control: It is represented by rectangle that shows the period of time during which an
object performs some actions.
1: Request form
4: submit
S: Student A: Admin
2: give form
6: eligible
State chart Diagram: A State chart diagram shows a state machine, consisting of states,
transitions, events, and activities.
Event: It refers to happening of an activity at a given time and place.
10
Activity Diagram: An activity diagram is a special kind of state chart diagram that shows the
flow from activity to activity within a system, which are connected by a triggerless transition.
We can check some conditions using decision box, which is denoted by a diamond.
Activity: It is a major task that must take place in order to fulfill an operation contract.
Initial Activity: This shows the starting point of the flow. It is denoted by solid circle.
11
Final Activity: This shows the end of the flow in the activity diagram. It is denoted by a solid
circle nested in a circle.
Decision Box: A point in an Activity diagram where a flow splits into several mutually exclusive
guarded flows. It has one incoming transition and two outgoing transitions.
Forking and Joining:-We use synchronization bar to specify the forking and joining of parallel
flows of control.
A synchronization bar is a thick horizontal or vertical line.
A Fork may have one incoming transition and two or more outgoing transitions, each of which
represents an independent flow of control.
A Join may have two or more incoming transitions and one outgoing transition.
Student
synchronization
Forking bar
Listen Watch
Joining
Success
Swimlanes: They are used to group related activities into one column.
12
Identifying & Analyzing Events:
Event: An event occurs at a specific time and place, can be described, and should be remembered
by the system events drive or trigger all processing that a system does, so listing events and
analyzing events makes sense when you need to define system requirements by identifying use
cases.
Event decomposition, is a technique that first focuses on the events a system needs to respond to
and then looks at how a system must respond the systems use cases.
Types of Events:
External Events
Temporal Events
State Events
External Events: It is an event that occurs outside the system usually initiated by an external
agent. An external agent is a person or organizational unit that supplies or receives data from the
system, not necessarily system user
Eg: Customer
13
Another type of external event occurs when external entities provide new information that the
system simply needs to store for later use
Temporal Event: A temporal event, an event that occurs as a result of reaching a point in time.
These events are different from external events in that the system should automatically produce
the required output without being told to do so.
In other words, no external agent is making demands, but the system is supposed to generate
need information or other outputs when they are needed.
Eg: Payroll systems that produce a pay check every two weeks (or each month).
Eg: A bill might be given to a customer when a sale has occurred. If the bill has not been paid
within 15 days, the system might send a late notice.
The temporal event, Time to send late notice, might be defined as a point 15 days after billing
date.
State Events: State event, an event that occurs when something happens inside the system that
triggers the need for processing.
Eg: If the sale of a product results in an adjustment to an inventory record and the inventory in
stock drops below a reorder point , it is necessary to reorder.
Sometimes they are similar to temporal events, except that the point in time can’t be defined. The
records event might be named time to reorder inventory, which sounds like a temporal event.
14
Identifying use cases:
A use case is an activity the system carries out, usually in response to a request by a user. In the
inception phase of any project, analysts identify many of the key use case. By the end of the
elaboration phase, they should have identified all the use cases and described them in detail.
Several techniques are recommended for identifying use cases.
One approach is to list all the users and think through what they need the system to do for their
jobs. By focusing on one type of user at a time, the analyst can systematically address the
problem of identifying use cases.
Another approach is to start with the existing system and list all system functions that are
currently included, adding any new functionality requested by users.
A third approach is to talk to all users to get them to describe their goals in using the system.
Use Cases for customer support system:
1. Customer looks for item availability.
2. Customer creates new order.
3. Customer updates order.
4. Customer look up for order status.
5. Manager records order fulfillment.
6. Manager records backorder if any.
15
7. Customer creates order return.
8. Manager provides catalog information.
9. Customer updates account information.
10. Manager distributes promotional package.
11. Manager creates and updates catalog.
Use cases for POS:
1. Customer arrives at POS checkout with goods and /or services to purchase.
2. Cashier starts a new sale.
3. Cashier enters item identifier.
4. System records sale line item and presents item description, price, and running total price
calculated from a set of price rules.Cashier repeats step 3-4 until indicates done.
5. System presents total with taxes calculated.
6. Cashier tells customer the total, and ask for payment.
7. Customer pays and system handles payment.
8. System logs completed sale and sends sale and payment information to the external
Accounting system (for accounting and commissions) and inventory system (to update
inventory).
9. System presents receipt.
10. Customer leaves with receipt and goods (if any).
1. Student / member enters into library and request for membership form.
2. Librarian gives membership form.
3. Student / member submit membership form to librarian.
4. Librarian approves and adds to library.
5. Acknowledges with library ID.
6. Student / member searches for book availability.
7. Student / member requests for book issue.
8. Librarian issues book with expiry date.
9. Student / member returns or request for renewal of the book.
10. If returned library clerk checks for any dues.
16
Event Table for Customer Support System:
EVENT TRIGGER SOURCE USECASE RESPONSE DESTINATIO
N
Customer wants Item enquiry Customer Lookup item Item availability Customer
availability details
to check
item availability
Customer places New order Customer Create new order Real time link Credit bureau
an order order conformation customer
order details shipping
transaction bank
Customer Order change Customer Update order Change Customer
changes confirmation shipping
or cancels order request order change bank
details
Transaction
Time to produce End of week, Produce order Order summary Management
order summary month,quarte summary reports reports
reports r
and year
Time to produce End of day Produce Transaction Accounting
transaction transaction summary reports
17
summary summary reports
reports
Customer or Order status Customer or Look up order Order status details Customer or
management enquiry management status management
wants to check
order status
Shipping fulfills Order Shipping Record order
order fulfillment fulfillment -
notice
Shipping Back order Shipping Record back Back order Customer
identifies notice order notification
back order
Customer Order return Customer Create order Return Customer
returns item notice return confirmation Bank
transaction
Time to produce End of week, Produce Fulfillment Management
fulfillment month,quarte fulfillment summary
summary r summary reports reports
reports and year
Prospective Catalog Prospective Provide catalog Catalog Prospective
customer request customer info customer
requests catalog
Time to produce End of month Produce Prospective Marketing
prospective prospective customer
customer customer activity reports
activity reports activity
reports
Customer Customer Customer Update customer
updates account
account update notice account
information
Marketing Promotion Marketing Distribute Promotional Customer and
wants package promotional package prospective
to send details package customer
promotional
materials to
customers
Management Customer Management Create customer Charge Customer
adjusts charge charge adjustment Bank
customer adjustment adjustment notification
charges transaction
Time to produce End of month Produce Customer Management
- customer adjustment
customer adjustment reports
adjustment/ reports
concession
18
reports
Merchandising Catalog Merchandisin Update catalog
updates update details g -
catalog
Merchandising Special Merchandisin Create special
creates promotion g promotion -
special product details
promotion
Merchandising New catalog Merchandisin Create new Catalog Customer and
creates details g catalog prospective
new catalog customer
Time to produce End of month Produce catalog Catalog activity Merchandising
- activity reports reports
catalogue
activity reports
Class Diagrams:
19
customer
cart
name product
phone number product name
product name
address product Id
product Id
*
order() getProductname()
enquiry()
getproductId()
cash on delivary()
credit()
debit()
refund()
20
member
Id
name
product pwd
product id mobile no
product name address
price creditcard no
category
stock addmember()
update()
addproduct() createorder()
updatestock() 1
updateprice()
1
1..*
order_transaction
orderID payment
1..*
detail_order memberID paymentID
totalprice payment method
detailorderID
orderdate payment date
productID
order type payment status
quantity 1..* 1 1 1
add Transactio() add payment()
get member() update status()
create pay ment()
21
library catalogue
name : string
total books : int
created by : string
issue book()
return book() course book
reference book issue Id
add book() member
delete book() reference Id date of return
name : string
libId : void
address : string
DOB : int
contact no : int
name2
student emloyee
course name : string updateinfo() emp Id
student Id : void takemembership() dep name
removemembership()
checkbookdetail() issuebook() checkbookdetail()
returnbook()
22
CRUD Matrix For Customer Support System
Usecases Domain Classes
Inventory Order Item Product Return
Catalog Customer Item Order Order Item Transaction Package Item Item Shipment Shipper
Look up item availabilty R
Create Netwok CRUD RU CR C C R R C R
Update Order UD RU RUD RUD RUD R R CRUD R
Look Up Order Status R R R R R R
Record Fullfillment RU RU
Record Back Order RU CRU
Create Order Return CRU RU C C
Provide Catalog information R R R R
Update Account Customer CRUD
Distribution Promotional Package R R R R R
Create Customer Change Adjustment RU CRUD
Update Catalog RU R RU R
Create Special Promotion R R R R
Create new Catalog C R R CRU R
23
Crud Matrix for Point of Sale
24
Use case Diagrams:
login
search item
customer manager
check availability
buy product
calculate price
update item
payment
shipment
shipper
25
Use case Diagram for Point of Sale
supplier
inventory system
update inventory check inventory
customer
scan item
26
Use case Diagram for Library Management System
add membership
delete membership
librarian
add book
clerk
req membership
delete book
member
enquire book
check availability
issue book
27
Sequence Diagrams:
1.item search()
2.select item()
3.create order()
4.item is available or not()
5.item is instock()
6.order confirmatio()
11.update catalog
28
Sequence Diagram for Point Of Sale
1.create() 2.create()
3.specification() 4.find()
item() 6.create()
7.add()
29
Sequence Diagram for Library Management System
request membeshi[p
assign library ID
search result
issue book
30
Collaboration Diagrams:
1: 1.item search()
2: 2.select item()
catalog 3: 3.create order() item
7: 6.order confirmatio()
6: order
9: 8.pays amount()
8: 7.request for payment()
12: 11.update catalog 5: 5.item is instock()
11: 10.delivers the item
31
Collaboration Diagram for Point Of Sale
product
3: 3.specification() catalogue
1: 1.create()
5: item()
customer
sale
4: 4.find()
2: 2.create()
6: 6.create()
7: 7.add()
product sales
specification lineitem
32
Collaboration Diagram for Library Management System
librarian
library
library book
catalog
33
Component Diagrams:
Login Order
Records Inventory Inventory
Updates Reports
DataBase
Transaction
Credit Check
Verification Verification
Authentication
Server
34
Component Diagram for Point Of Sale
Terminal Window
Application Server
Scanning Login
Inventory Inventory
Updation Reports
Authentication Transaction
Server
credit Billing
Verification
Data Base
35
Component Diagram for Library Management System
Book
Management Member Library EMP
Management management
Library
Catalog Library
System
36
State Chart Diagrams:
Order
confirmation
Dispatch
order
37
State Chart Diagram for Point of Sale
enter items
Authorized
End Sale
Make Cash Payment
Make Credit Payment
Authorizing Waiting for
Payment payment
38
State Chart Diagram for Library Management System
Validate
Member
Not Valid
Valid
Issue Book
39
Activity Diagrams:
40
cust omer login
no
v alidat es
y es
search f or item
check av ailability
no
y es
order it em
s hips item t o
cust omer
41
NewSwimlane
customer arrives at
checkpoint
cashier enters
itemid,name,price
cashier calculates
price with tax
customer
payment
transaction
completed
42
Book Search Validation Issue
Acknowledge about
Enquire about a
book availability
book
Issue Request
Enter ISBN
Issue Book
Check Check
availability Membership
Yes
No
Message Box
Deployment Diagrams:
43
Deployment Diagram for Customer Support System
Data Tier
44
Printer
Application Server
Database
Terminal
Barcode
scanner
45
Client Application
Desktop Server
Database
Server
46