Bus Reservation System
Bus Reservation System
1. INTRODUCTION
1.1A Brief Introduction to UML
The Unified Modeling Language (UML) is the industry-standard language for specifying,
visualizing, constructing, and documenting the artifacts of software systems, as well as other non
software systems. UML simplifies the complex process of software design, making a "blueprint"
for construction, and is now the standard notation for software architecture. UML provides both
the structural views and behavioral views of the system. A set of diagrams with different
graphical elements is the core part as well as the most expressive presentation in UML. The
UML includes nine kinds of diagrams, for the sake of grasp the most representative aspects of
the design of elevator system, in this paper only following UML diagrams are used and analyzed:
Use Case diagram shows a set of use cases and actors (a special kind of class) and their
relationships. Use case diagrams address the static use case view of a system, these diagrams are
important in organizing and modeling the behaviors of a system.
Class diagram shows a set of classes, interfaces, and collaborations and their relationships.
Class diagrams are the most common diagrams used in modeling object-oriented systems. Class
diagrams address the static design view of a system.
Sequence diagram is an interaction diagram. Interaction diagrams address the dynamic view of
a system, besides sequence diagram, the other interaction diagram in UML is the Collaboration
diagram. Sequence diagram emphasizes the time ordering of messages between objects in the
system, while collaboration diagram emphasizes the structural organization of the objects that
send and receive messages. Sequence diagrams and collaboration diagrams are isomorphic, and
can be transformed from one into the other. Since either of them contributes to the same extend
of understanding of our system, while sequence diagrams give more ideas of time, which is
essential for real time systems, only the sequence diagrams are given in this report.
State chart diagram shows a state machine, consisting of states, transitions, events and
activities. State chart diagrams address the dynamic view of a system. State chart diagrams are
especially important in modeling the behavior of an interface, class, or collaboration and
emphasize the event-ordered behavior of an object, which is especially useful in modeling
reactive systems.
Bus Enquiry
The system allows the user or member to perform bus enquiry including bus scheduling,
seats availability status, fare details, etc.
User Registration
It allows the user to register in order to be a member of the system. User is then granted
privileges to book or cancel tickets.
• Use cases. A use case describes a sequence of actions that provide something of
measurable value to an actor and is drawn as a horizontal ellipse.
• Actors. An actor is a person, organization, or external system that plays a role in one or
more interactions with your system. Actors are drawn as stick figures.
• Associations. Associations between actors and use cases are indicated in use case
diagrams by solid lines. An association exists whenever an actor is involved with an
interaction described by a use case. Associations are modeled as lines connecting use
cases and actors to one another, with an optional arrowhead on one end of the line. The
arrowhead is often used to indicating the direction of the initial invocation of the
relationship or to indicate the primary actor within the use case.
• System boundary boxes (optional). We can draw a rectangle around the use cases,
called the system boundary box, to indicate the scope of your system. Anything within
the box represents functionality that is in scope and anything outside the box is not.
• Packages (optional). Packages are UML constructs that enable you to organize model
elements (such as use cases) into groups. Packages are depicted as file folders and can be
used on any of the UML diagrams, including both use case diagrams and class diagrams.
Login
Validation
Check Availability
<<extend>>
Passenger
Seat Selection Window
verification() <<extend>>
Non Window
<<extend>>
Payment
<<extend>>
Cheque
Credit card
Cancellation <<include>>
<<include>>
Payment Deduction
Description:
1. Login: It allows the existing user to login.
2. Check Availability: It verifies the user login against the password.
3. Booking Pass details: It allows the user to enter the passenger details.
4. Seat Selection: It allows the user to select the passenger seat.
5. Window: It allows the user to select the window seat.
6. Non Window: It allows the user to select the non window seat.
7. Payment: It allows the user to make the payment according to the selected mode.
8. Cheque: It allows the user to make the payment.
9. Credit card: It allows the user to make the payment by credit card.
10. Cancellation: It allows the user to make cancellation.
11. Cancel Receipt Generated: It allows the user to cancel the receipt generated
according to the cancellations made.
12. Payment Deduction: Calculates the refundable amount and the amount to be
deducted.
13. Validation: Allows updation to be done.
Use case ID 1
Use case name Seat selection
Actor Online Passenger
Pre-condition Login into the system
Post-condition select seat
Flow of events
Use case ID 2
Use case name Window Seat
Actor Online Passenger
Pre-condition Seat selection
Post-condition select window seat
Flow of events
Use case ID 3
Use case name Non Window Seat
Actor Online Passenger
Pre-condition Seat selection
Post-condition Select non window seat
Flow of events
Use case ID 4
Use case name Select credit card
Actor Online Passenger
Pre-condition Purchase ticket
Post-condition Add credit card details
Flow of events
Use case ID 5
Use case name Select Cheque
Actor Online Passenger
Pre-condition Purchase ticket
Post-condition
Flow of events
Use case ID 6
Use case name Select Cancellation
Actor
Pre-condition Enter details
Post-condition Payment deduction and cancel receipt generated
Flow of events
Use case ID 7
Use case name Booking pass details
Actor Online Passenger
Pre-condition Enter details of passenger
Post-condition Details stored
Flow of events
Activity modeling focuses on the execution and flow of the system, rather than how it is
implemented. They are applicable to any type of behavioral modeling. Activity diagrams
captures activities that are made up of smaller actions. When used for software modeling
activities typically represents a behavior invoked as a result of a method call.
Activity diagrams are typically used for business process modeling, for modeling the logic
captured by a single use case or usage scenario, or for modeling the detailed logic of a business
rule. Although UML activity diagrams could potentially model the internal logic of a complex
operation it would be far better to simply rewrite the operation so that it is simple enough that
you don’t require an activity diagram. In many ways UML activity diagrams are the object-
oriented equivalent of flow charts and data flow diagrams (DFDs) from structured development.
The easiest way to visualize an Activity diagram is to think of a flowchart of a code. The
flowchart is used to depict the business logic flow and the events that cause decisions and actions
in the code to take place.
Registered Passenger?
No Register
Yes
Book Tickets?
No
Cancellation
Reciept
Generation
No
Yes
Fill Cancellation
Form
Valid
No Cannot Cancel
Yes
Cancel Ticket
Update
Database
Generate
Reciept
Logout
Enquiry Details
GetDetails
Return Status
Availability Details
Login Details
Username & Password
Provide Access
Registration Form
Succesful Update
Successful Registration
System Database
: Passenger
New User Request
Registration Form
Succesful Update
Successful Registration
Return Details
Reservation Details
Release Tickets
Payment Deduction
Update Succesful
Collaboration diagram is very similar to a Sequence diagram in the purpose it achieves; in other
words, it shows the dynamic interaction of the objects in a system. A distinguishing feature of a
Collaboration diagram is that it shows the objects and their association with other objects in the
system apart from how they interact with each other. The association between objects is not
represented in a Sequence diagram.
• Shows the structural requirement for completing a task. They identify the objects that
participate in an interaction.
• Shows the interface requirement for a particular class.
• Identify the data that is passed as a part of the interaction.
4: Availability Details
: Passenger
2: GetDetails
3: Return Status
Database
System :
System 3: Retrieve Member Details
4: Provide Access
: Passenger
: System
5: Payment Details
13: Payment Reciept Generated
6: Provide Booking Form
8: Request For Payment
14: Payment reciept
15: PNR Details
2: Provide Reservation Details Payment :
11: Update Database Payment
: Passenger
4: Availability Status
12: PNR Generated
Database :
Booking
7: Payment Deduction
4: Reservation Details
10: Cancellation Reciept Provided
: Passenger
9: Cancellation Reciept Generated
: Payment
3: Return Details
8: Update Succesful
2: Retrieve Details
6: Release Tickets
Database
2: Registration Form
: Passenger 6: Successful Registration
4: Verifying Registration Details
5: Succesful Update
Database :
Passenger
The state transition diagram represents a single object. It shows how external factors
cause changes in the object over its lifetime. It captures the behavior of a software system. They
provide an excellent way of modeling communications that occurs with external entities via a
protocol or event.
State diagrams are used to give an abstract description of the behavior of a system. This behavior
is analyzed and represented in series of events that could occur in one or more possible states.
Hereby "each diagram usually represents objects of a single class and tracks the different states
of its objects through the system".
The following are the basic notational elements that can be used to make up a diagram:
Filled circle, pointing to the initial state
Hollow circle containing a smaller filled circle, indicating the final state (if any)
Rounded rectangle, denoting a state. Top of the rectangle contains a name of the state. Can
contain a horizontal line in the middle, below which the activities that are done in that state are
indicated
Arrow, denoting transition.
Thick horizontal line with either x>1 lines entering and 1 line leaving or 1 line entering and x>1
lines leaving. These denote join/fork, respectively.
Identify the specific responses of an object to everything that can happen to the object.
Identifies what events an object will and will not respond.
Validate the data needed to define the state of the object and the attributes affected by the
change.
Helps in finding the internal effects of behavior that can not be seen using interaction based
diagrams.
State Chart Diagram
PNRGen( passid,booking_details )
PayReceiptGen()
1
1 1 1
Passenger
Pass_Id : Integer
Pass_name : String
Pass_add : Variant
Pass_tel : Integer
Pass_birth : Date
Enquiry()
PassReg()
PassIdGen()
<<GUI>> <<INFRASTRUCTURE>>
WEB BUS RESERVATION
BROWSER SYSTEM
MYSQL
<<SERVER>>
<<WEB BROWSER>> WEB SERVER
CLIENT COMPUTER
<<HTTP>>
TCP/IP
<<JDBC>>
<<MYSQL>>
DATABASE SERVER
TCP/IP