AI Practical 1
AI Practical 1
AI Practical 1
2
Objectives
3
UML Diagrams
• A UML diagram is a diagram based on the UML (Unified Modeling Language) that is used to
visually describe a system, including its major actors, roles, actions, artifacts, or classes, in
order to better understand, edit, maintain, or document system information.
Presentation title 4
Use Case Diagram
A use case diagram is used to represent the dynamic behavior of a system. It
encapsulates the system's functionality by incorporating use cases, actors, and their
relationships.
It models the tasks, services, and functions required by a system/subsystem of an
application. It depicts the high-level functionality of a system and also tells how the user
handles a system.
• Purpose of Use Case Diagram
1.It gathers the system's needs.
2.It depicts the external view of the system.
3.It recognizes the internal as well as external factors that influence the system.
4.It represents the interaction between the actors.
Presentation title 5
• Elements of Use Case Diagram
1. Actor: Actors are individuals who have a relationship within the system. They
interact with each step of the process. This may include users, customers, clients
or employees
2. Use Cas: Use cases, often represented by an oval or circle encompassing text,
describe a system function that is an actor or person can start or use.
3. Relationships: A solid, straight line can represent an actor's interaction with a use
case or use cases' interactions. Various relationships such as:
Associations: Association links represent interactions between actors and use cases.
Generalizations: Generalization links represent relationships between actors that
depend on each other's functions to complete their role within a system.
Extensions: Extension links represent optional functions within a system. These
links may connect actors to use cases or multiple related use cases without
depending on one another for functionality.
Presentation title 6
Inclusions: Inclusion links represent additional functions necessary to complete a
system and may form connections between two use cases or use cases and actors.
4. System boundary
• The system boundary is a visual limitation of the entire system
module.
Presentation title 7
1.Use Case Diagram
Presentation title 8
Followings are the actors of railway reservation system:
1.Passenger : Use cases of passengers are login, ticket availability, Filling the form,
Book ticket, Canceling ticket, and Refund money.
2.Railway Reservation System: Use cases of the Railway Reservation System are
login, ticket availability, Fill the form, Book ticket, Cancel ticket, and Refunding
money.
3.Admin: use cases of Admin are Print ticket, refund money. Admin also controls
the whole Railway Reservation System in different cases.
Presentation title 9
Class Diagram
The class diagram depicts a static view of an application. It represents the
types of objects residing in the system and the relationships between them.
A class consists of its objects, and also it may inherit from other classes. A
class diagram is used to visualize, describe, document various different
aspects of the system, and also construct executable software code.
• Benefits of class diagram:
1.It can represent the object model for complex systems.
2.It reduces the maintenance time by providing an overview of how an
application is structured before coding.
3.It provides a general schematic of an application for better understanding.
Presentation title 10
There are following three sections in class diagram:
1. Upper Section: The upper section encompasses the name of the class. A
class is a representation of similar objects that shares the same
relationships, attributes, operations, and semantics.
2. Middle Section: The middle section constitutes the attributes, which
describe the quality of the class. The attributes are written along with its
visibility factors, which are public (+), private (-), protected (#), and
package (~).
3. Lower Section: The lower section contain methods or operations. The
methods are represented in the form of a list, where each method is written
in a single line. It demonstrates how a class interacts with data.
Presentation title 11
Class Diagram
Presentation title 12
Classes for railway reservation system:
• Customer/Passenger: Manages all operations of customer like login,
search train, book ticket, pay charges, etc
• Admin: Manages all operations of admin like check form details,
refund fees, etc
• Railway Ticket: Manages all operations of railway ticket like delete
ticket, generate new ticket.
• Railway reservation system: Manages all operations of reservation
like giving responses.
• Payment: Manages all operations of payment like ticket generation.
Presentation title 13
Component Diagrams
• Component diagrams show a set of components & their
relationships.
• Component diagram mainly contain components , provided
and required interfaces , relationships between the Train
Schedule, Ticket Booking ,Customer and Payment .
• Like all other diagrams , component diagram may contain
notes & constraints.
• Component diagram models the static implementation view
of the system.
Presentation title 15
Sequence Diagram
The sequence diagram represents the flow of messages in the system and is also
termed as an event diagram. It helps in envisioning several dynamic scenarios. It
portrays the communication between any two lifelines as a time-ordered sequence
of events, such that these lifelines took part at the run time.
In UML, the lifeline is represented by a vertical bar, whereas the message flow is
represented by a vertical dotted line that extends across the bottom of the page.
• Purpose Of Sequence diagram
1.To model high-level interaction among active objects within a system.
2.To model interaction among objects inside a collaboration realizing a use case.
3.It either models generic interactions or some certain instances of interaction.
Presentation title 16
Followings are the elements of sequence diagram:
1. Life-line: An individual participant in the sequence diagram is
represented by a lifeline. It is positioned at the top of the diagram.
2. Actor: A role played by an entity that interacts with the subject is called
as an actor. It is out of the scope of the system. It represents the role,
which involves human users and external hardware or subjects
3. Messages: The messages depict the interaction between the objects and
are represented by arrows. They are in the sequential order on the lifeline.
The core of the sequence diagram is formed by messages and lifelines.
There are two types of messages as follows:
• Call message
• Return message
Presentation title 17
4. Sequence Fragments: Sequence fragments have been introduced by
UML 2.0, which makes it quite easy for the creation and maintenance of
an accurate sequence diagram.
It is represented by a box called a combined fragment, encloses a part of
interaction inside a sequence diagram.
Presentation title 18
Sequence Diagram
The designed sequence diagram illustrates the series of events that
occurs in Railway Reservation System. In this illustration, the actors are
represented by a stick man and the transactions or classes are
represented by objects. It will give you clear explanation about the
behavior of the Railway Reservation System in terms of processing the
flow of instructions.
Presentation title 19
Presentation title 20
Deployment Diagram
•A deployment diagram is a diagram that shows the configuration of
run time processing nodes and the components that live on them.
•Deployment diagrams commonly contain: -
Nodes
Dependency and association relationships
•The deployment diagram shows how a system will be physically
deployed in the hardware environment.
Presentation title 21
Nodes and Components
• In many ways, nodes are a lot like components: Both have names; both
may participate in dependency, generalization, and association
relationships; both may be nested; both may have instances; both may
be participants in interactions.
Presentation title 24
Activity diagrams
Final nodes
Activity final node – terminates an activity.
Activity Diagram
Presentation title 28
Advantages
• It will reserve and cancel seat for passengers easily
• It contain information about train and passengers
• It can detail about reservation fees and any concession fees, etc.
• It will Update Up-Time and Down-Time of train
• Searching for train will so easy.
Presentation title 29
CONCLUSIONS
In this project we design the different UML diagram
for railway reservation system.
Presentation title 30
Thank you 😊😊😊