Courier Manegment System
Courier Manegment System
Case Study
Unified Modeling Language Documentation
For
Courier Management System
Prepared by :
204
235
RGIT, MUMBAI
Page 1
Tanay Bhatt
Mukesh Nayal
Department of MCA.
S.no
Content
Page
no
1.
Scope
1.1
Audience
1.2
Organization
2.
3.
Activity Diagram
4.
5.
12
6.
21
7.
23
8.
Component Diagram
27
9.
Deployment Diagram
29
RGIT, MUMBAI
Page 2
Department of MCA.
1. Scope :
1. Audience :
Customers, Administrators, Head office.
2. Organization :
COURIER MANAGEMENT SYSTEM
RGIT, MUMBAI
Page 3
Department of MCA.
Page 4
Department of MCA.
3. Activity Diagram.
An Activity diagram is a visual representation of any system's activities and flows of
data or decisions between activities.
Activity diagrams provide a very broad view of a business process.
They represent the dynamics of a system.
They are flow charts that are used to show the work flow of a system.
They show the flow of control from activity to activity in the system.
They show what activities can be done in parallel, and any alternative paths through
the flow.
Purpose
Model business workflows
Model operations
Activity diagrams commonly contain
Activity states and action states
Transitions
Objects
Action States and Activity States
Action states are atomic and cannot be decomposed
Work of the action state is not interrupted
Activity states can be further decomposed
Their activity being represented by other activity diagrams
They may be interrupted
Represented in UML by a rounded rectangle.
They are typically triggered by the completion of the behavior in the originating
activity.
RGIT, MUMBAI
Page 5
Department of MCA.
When the action or activity of a state completes, flow of control passes immediately to
the next action or activity state
A flow of control has to start and end at some place
initial state -- a solid ball
stop state -- a solid ball inside a circle
Branching
When modeling the workflow of a system, it is often necessary to show where the
flow of control branches based on a decision point.
A fork may have one incoming transitions and two or more outgoing transitions
each transition represents an independent flow of control
conceptually, the activities of each of outgoing transitions are concurrent
either truly concurrent (multiple nodes)
or sequential yet interleaved (one node)
RGIT, MUMBAI
Page 6
Department of MCA.
A join may have two or more incoming transitions and one outgoing transition
above the join, the activities associated with each of these paths continues in
parallel
at the join, the concurrent flows synchronize
each waits until all incoming flows have reached the join, at which point
one flow of control continues on below the join
Swimlanes
Swimlanes may be used to partition an activity diagram.
This facility allows activity diagrams to expand and show who has the responsibility
for each activity in a process
A swimlane specifies a locus of activities
To partition the activity states on an activity diagram into groups
each group representing the business organization responsible for those
activities
each group is called a swimlane
Each swimlane is divided from its neighbor by a vertical solid line
Each swimlane has a name unique within its diagram
Each swimlane may represent some real-world entity
Each swimlane may be implemented by one or more classes
Every activity belongs to exactly one swimlane, but transitions may cross lanes
The Activity Diagram for Courier Management system is as shown in fig 4.1
RGIT, MUMBAI
Page 7
Department of MCA.
Existing customer?
Yes
Check Details
Get Details
No
Get Cust_ID
Cancel Order
Yes
Dispatched?
Yes
Cannot Cancel
No
No
Parcel Details
Fill Cancel
Form
Type?
Local
Cancel Order
Return Packet
International
Check
Destination
Check
Destination
Calculate
Weight
Calculate
Weight
Calculate
Amount
Calculate
Amount
Generate Bill
Generate Bill
Dispatch
Diapatch to
Head Office
Refund
Set Status
Delivered
Resend
>2
No
Yes
Obtain POD
Return Packet
Get Details
Close Order
Page 8
Department of MCA.
1. Use-Case Diagram.
The use-case concept was introduced by Ivar Jacobson in the object-oriented software
engineering (OOSE) method.
A use-case diagram is a graph of actors, a set of use cases enclosed by a system
boundary, communication (participation) associations between the actors and the use
cases, and generalization among the cases.
Use case diagrams show how users interact with the system.
Use case diagrams describe what a system does from the standpoint of an external
observer. The emphasis is on what a system does rather than how.
Actors
An actor models an external entity which communicates with the system:
User
External system
Physical environment
An actor has a unique name and an optional description.
Examples:
Passenger: A person in the train
GPS satellite: Provides the system with GPS coordinates
Use Cases
A use case represents a class of functionality provided by the
system as an event flow .A use case consists of:
Passenger
Purchase Ticket
RGIT, MUMBAI
Page 9
Department of MCA.
Customer
Sender and receiver detail
Accept the parcel
Enter Customer Details and click on button.
Use case ID
Use case name
Actor
Pre-condition
Post-condition
Flow of events
Customer
Calculate weight
Pay charges
Enter charges detail and click on Ok
Use case ID
Use case name
Actor
Pre-condition
Post-condition
Flow of events
Use case ID
Use case name
Actor
Pre-condition
Post-condition
Flow of events
RGIT, MUMBAI
Cancel order
Customer
Order not deliver
Cancel the order
Enter the invoice no.
Check status
Customer
Enter invoice number
Track the status of parcel
Check the availability of parcel
Page 10
Department of MCA.
Customer
Admin
Calculate Delivery Charges
Cancel Order
Head Office
Check Status
Record Details
RGIT, MUMBAI
Page 11
Department of MCA.
RGIT, MUMBAI
Page 12
Department of MCA.
Lifelines
Dashed or dotted line from past to future or from birth to death if a role with a limited
lifespan.
Death is marked with a large
May split and merge to represent alternative paths. E.g.,
Activation
Shown by a box over a lifeline
Represents an active role
May call itself recursively
Messages
Denoted by labeled horizontal arrows
If simply an arrow, represents flow of control.
If shown as:
}paired
RGIT, MUMBAI
Page 13
Department of MCA.
: Customer
: Admin
: Head Office
:Customer
:Order
Transaction
:Order Packet
Visits
:Order
createCust(cust_info)
:Services
status=chkStatus(cust_name)
sendParcel()
createOrder(order_info)
chkQty(id,qty)
chkPrice()
chkType()
chkService()
orderDetails()
sendConfirmation()
sendCourier()
RGIT, MUMBAI
Page 14
Department of MCA.
: Customer
:Order
: Admin
:Order Packet
:Services
:Order
Transaction
getOrder()
chkType(Orderid,Itemid)
chkWt()
calcAmt(type,wt)
createTrans(orderid,Amt)
produceChrgs(trans)
: Customer
: Admin
:Order
:Order Packet
:Order
Transaction
cancelRequest()
chkOrder(Orderid)
chkStatus()
cancelItem()
orderStatus()
canTransaction()
cancelConfirm()
Page 15
Department of MCA.
: Customer
:Order
: Admin
:Order Packet
:Shipment
Status()
getDetails(id)
getItemDetails(itemid,orderid)
getStatus(itemid)
ShipmentDetails()
: Admin
:Order
:Order Packet
:Shipment
getOrderId()
getItem(orderid,itemid)
statusofDel(itemid,orderid)
getStatus()
RGIT, MUMBAI
Page 16
Department of MCA.
COLLABORATION Diagram Collaboration diagrams are also interaction diagrams. They convey the same
information as sequence diagrams, but they focus on object roles instead of the times that
messages are sent. In a sequence diagram, object roles are the vertices and messages are
the connecting links.
Collaboration diagrams show (used to model) how objects interact and their roles.
They are very similar to sequence diagrams. Actually they are considered as a cross
between class and sequence diagram.
Sequence Diagrams are arranged according to Time.
Collaboration Diagrams represent the structural organization of object.
[Both sequence and collaboration diagrams are called interaction diagrams]
Forms a context for interactions
May realize use cases
May be associated with operations
May describe the static structure of classes
Collaboration diagrams contain the following:
Class roles (subsystems/objects/classes/actors/ external systems) as before.
Association roles (pathways or links over which messages flow)
Message flows (messages sent between class roles)
Association Roles
Often classes
Define the interaction between class roles.
RoleName:AssociationName
Multiplicity
Multiplicity
RGIT, MUMBAI
Page 17
Department of MCA.
: Head Office
12: sendConfirmation()
: Customer
11: sendCourier()
:Order
Transaction
1: Visits
4: sendParcel()
10: orderDetails()
:Services
:Customer
2: createCust(cust_info)
3: status=chkStatus(cust_name)
: Admin
9: chkService()
5: createOrder(order_info)
6: chkQty(id,qty)
7: chkPrice()
8: chkType()
:Order
:Order
Packet
: Customer
: Admin
6: produceChrgs(trans)
:Order
Transaction
1: getOrder()
:Order
Packet
5: createTrans(orderid,Amt)
:Order
2: chkType(Orderid,Itemid)
3: chkWt()
:Services
4: calcAmt(type,wt)
Page 18
Department of MCA.
1: cancelRequest()
7: cancelConfirm()
: Customer
: Admin
2: chkOrder(Orderid)
5: orderStatus()
6: canTransaction()
:Order
:Order
Transaction
3: chkStatus()
4: cancelItem()
:Order
Packet
2: getDetails(id)
:Order
: Customer
: Admin
3: getItemDetails(itemid,orderid)
5: ShipmentDetails()
:Shipment
:Order
Packet
4: getStatus(itemid)
RGIT, MUMBAI
Page 19
Department of MCA.
:Order
1: getOrderId()
2: getItem(orderid,itemid)
: Admin
4: getStatus() 3: statusofDel(itemid,orderid)
:Order
Packet
:Shipment
RGIT, MUMBAI
Page 20
Department of MCA.
6 STATECHART Diagram :
A Statechart diagram describes a state machine. Now to clarify it state machine can be
defined as a machine which defines different states of an object and these states are
controlled by external or internal events.
Purpose:
Statechart diagram is one of the five UML diagrams used to model dynamic nature of a
system. They define different states of an object during its lifetime. And these states are
changed by events. So Statechart diagrams are useful to model reactive systems. Reactive
systems can be defined as a system that responds to external or internal events.
Following are the main purposes of using Statechart diagrams:
To model dynamic aspect of a system.
To model life time of a reactive system.
To describe different states of an object during its life time.
Define a state machine to model states of an object.
Notation :
State
Transition
Initial State
Final State
RGIT, MUMBAI
Page 21
Department of MCA.
Statechart Diagram :
AddToOrder(Order_id,Desc,Qty)
CreateOrderPacket()
createOrder(Order_info)
Adding
Items
calcAmount(type,weight)
Dispatching
Calculating
sendPacket()
addToBill(OrderId)
Shipped
Closed
RGIT, MUMBAI
Page 22
Department of MCA.
7. CLASS Diagram :
The class diagram is a static diagram. It represents the static view of an application. Class
diagram is not only used for visualizing, describing and documenting different aspects of
a system but also for constructing executable code of the software application.
The class diagram describes the attributes and operations of a class and also the
constraints imposed on the system. The class diagrams are widely used in the modelling
of object oriented systems because they are the only UML diagrams which can be
mapped directly with object oriented languages.
The class diagram shows a collection of classes, interfaces, associations, collaborations
and constraints. It is also known as a structural diagram.
Purpose:
The purpose of the class diagram is to model the static view of an application. The class
diagrams are the only diagrams which can be directly mapped with object oriented
languages and thus widely used at the time of construction.
The UML diagrams like activity diagram, sequence diagram can only give the sequence
flow of the application but class diagram is a bit different. So it is the most popular UML
diagram in the coder community.
So the purpose of the class diagram can be summarized as:
Analysis and design of the static view of an application.
Describe responsibilities of a system.
Base for component and deployment diagrams.
Forward and reverse engineering.
Notation:
Class
RGIT, MUMBAI
Page 23
Department of MCA.
Association
Composition
Dependency
Aggregation
Aggregations
indicate
a
whole-part
relationship, and are known as "has-a"
relationships. An Aggregation relationship is
indicated by a line with a hollow diamond.
Generalization
RGIT, MUMBAI
Page 24
Department of MCA.
RGIT, MUMBAI
Page 25
Department of MCA.
delivers
1
createDelP()
checkStatus()
assignPacket()
showStatus()
Mediator
recipien
t
Services
Type
Price
CustId
MaxWt
MinWt
provide
s
Service
createServices()
chkServices()
order
Order Packet
OrderId
PacketId
Price
Type
Weight
Dest
Status
orders
1
getCustDetails()
createCust()
chkStatus()
initiator
0..*
1..*
1
New Order
OrderId
date
Total
CustId
NoOfPackets
Status
createOrder()
cancelReq()
changeStatus()
generator
searchOrder()
delOrder()
order
Receive
r
createPacket()
chkType()
calcAmt()
delPacket()
order
generator
Customer
Name
CustId
Address
Telephone
Pincode
Ship
s
1..*
Shipment
ShipNo
DateSent
DateArrived
Status
PacketId
Del_Id
Reason
sorrPackets()
assignPackets()
receivePacket()
createConfirm()
deletePacket()
has
initiates
generator
1
1..*
Transa
ction
Order Transaction
OrderId
BillNo
Date
Amount
prepBill()
generateBillNo()
AddOrderChrgs()
calcTotal()
printBill()
generateBillDetails()
showBillDetails()
RGIT, MUMBAI
Page 26
Department of MCA.
8. Component Diagram
Component diagrams are different in terms of nature and behavior. Component diagrams
are used to model physical aspects of a system.
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.
Purpose:
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.
So the purpose of the component diagram can be summarized as:
Visualize the components of a system.
Construct executables by using forward and reverse engineering.
Describe the organization and relationships of the components.
Notation :
Component
Dependency
RGIT, MUMBAI
Page 27
Department of MCA.
COMPONENT Diagram :
<<GUI>>
Application
<<INFRASTRUCTURE>>
<<LAN>
>
SYSTEM COURIER
MANAGEMENT
<<ODBC>
>
MySQL
RGIT, MUMBAI
Page 28
Department of MCA.
9. Deployment Diagram
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.
Purpose:
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.
The purpose of deployment diagrams can be described as:
Visualize hardware topology of a system.
Describe the hardware components used to deploy software components.
Describe runtime processing nodes.
Notation :
Component A component represents a software entity in a
system. Examples include source code files,
programs, documents, and resource files. On a
deployment diagram, components are placed within
nodes to identify their deployed location. A
component is represented using a rectangular box,
with two rectangles protruding from the left side, as
seen in the image to the right.
Node
A node represents a piece of hardware in the
system. This entity is represented by a threedimensional cube.
Association
RGIT, MUMBAI
Page 29
Department of MCA.
<<APPLICATION>>
Head Office Computer
<<APPLICATION>>
Admin's Computer
<<JDBC>>
Ethernet
<<MYSQL>>
Database Server
<<JDBC>>
TCP/IP
RGIT, MUMBAI
Page 30
Department of MCA.