Department of AI & ADS
PRACTICAL RECORD
Name :
Register Number :
Subject Code :
Subject Title : UML LAB
Year / Sem : III / V
ACADEMIC YEAR: 2025 – 2026
Certificate
This is to certify that the practical record “UML Lab” is a bonafide work
done by [Link].
submitted to the Department of AI & ADS, during the academic
year 2025 - 2026.
SUBJECT IN-CHARGE HEAD OF THE DEPARTMENT
(Mr. K. Naresh Kumar) (Mr. V. M. Navaneethakumar)
Submitted for University Practical Examination held on
INTERNAL EXAMINER EXTERNAL EXAMINER
INDEX
[Link]. DATE TITLE PAGE NO. SIGNATURE
1. a. Library Management System
2.
b. Automatic Teller Machine
3.
c. Student Information Management
4. d. Matrimony Service
5. e. Stock Management System
Ex. No: 01 Library Management System
Aim:
To design and implement UML diagrams for a Library Management System using PlantUML
Tool kit, illustrating the system's structure, interactions, and behaviour for software analysis and design.
Algorithm:
1. Identify Requirements
Understand how the library system functions — key users (librarian, student), actions (issue, return,
search books).
2. Design Use Case Diagram
Depict the functional interactions between actors (librarian, student) and the system.
3. Design Class Diagram
Identify entities like Book, Member, Librarian, and their relationships.
4. Design Sequence Diagram
Model the interaction for a core use case, like issuing a book.
5. Design Activity Diagram
Show the step-by-step workflow of the issue or return process.
6. Design State Diagram
Model the different states a book can be in (Available, Issued, Reserved).
7. Design Deployment Diagram
Illustrate hardware and software component placements.
8. Design Component Diagram
Break the system into logical components and show dependencies.
9. Write UML Code
Generate diagrams from code using PlantUML.
10. Validate Output
Verify diagrams are correct and reflect the system accurately.
Code and Diagrams:
1. Use Case Diagram – Library Management System
@startuml
actor Student
actor Librarian
rectangle "Library System" {
Student -- (Search Book)
Student -- (Borrow Book)
Student -- (Return Book)
Student -- (Reserve Book)
Librarian -- (Add Book)
Librarian -- (Remove Book)
Librarian -- (Issue Book)
Librarian -- (Receive Returned Book)
(Update Book Info) <-- Librarian
}
@enduml
Output:
2. Class Diagram – Library Management System
@startuml
class Book {
-bookID: int
-title: string
-author: string
-status: string
+getDetails()
}
class Member {
-memberID: int
-name: string
+searchBook()
+borrowBook()
+returnBook()
}
class Librarian {
-employeeID: int
-name: string
+addBook()
+removeBook()
+issueBook()
+receiveBook()
}
class Library {
-bookList: List<Book>
-memberList: List<Member>
+manageBooks()
+manageMembers()
}
Library --> Book
Library --> Member
Librarian --> Book
Member --> Book
@enduml
Output:
3. Sequence Diagram – Issue Book
@startuml
actor Student
participant "Library System" as Library
participant Librarian
participant Book
Student -> Library: Request Issue Book
Library -> Librarian: Verify Request
Librarian -> Book: Check Availability
Book --> Librarian: Status Available
Librarian -> Library: Confirm Issue
Library -> Student: Book Issued
@enduml
Output:
4. Collaboration Diagram Code – Issue Book (Library Management System)
@startuml
skinparam linetype ortho
skinparam dpi 150
skinparam object {
BackgroundColor White
BorderColor Black
FontSize 12
}
' Layout optimization for A4 readability
left to right direction
object Student
object LibrarySystem
object Librarian
object BookDatabase
Student -> LibrarySystem : 1. requestIssue(bookID)
LibrarySystem -> Librarian : 2. verifyStudent(studentID)
Librarian -> BookDatabase : 3. checkAvailability(bookID)
BookDatabase --> Librarian : 4. returnAvailability()
Librarian -> LibrarySystem : 5. approveIssue()
LibrarySystem -> BookDatabase : 6. updateStatus("Issued")
LibrarySystem --> Student : 7. confirmIssue()
@enduml
Output:
5. Activity Diagram – Book Issue Process
@startuml
start
:Login;
:Search Book;
if (Book Available?) then (yes)
:Request Issue;
:Verify Member;
:Update Book Status;
:Confirm Issue;
else (no)
:Display Not Available;
endif
stop
@enduml
Output:
6. State Diagram – Book Lifecycle
@startuml
[*] --> Available
Available --> Issued : Book Issued
Issued --> Returned : Book Returned
Available --> Reserved : Book Reserved
Reserved --> Issued : Reserved Book Issued
Returned --> Available
@enduml
Output:
7. Deployment Diagram – Library Management System
@startuml
node "Client Machine" {
component "Student Portal"
component "Librarian Portal"
}
node "Library Server" {
artifact "Library Application"
database "Library DB"
}
"Client Machine" --> "Library Server" : HTTP Request
"Library Server" --> "Library DB" : SQL Queries
@enduml
Output:
8. Component Diagram – Library Management System
@startuml
package "Library Management" {
[Search Module] --> [Book Database]
[Issue Module] --> [Book Database]
[Return Module] --> [Book Database]
[Login Module] --> [User Database]
[Admin Panel] --> [Book Management]
[Book Management] --> [Book Database]
}
@enduml
Output:
Result:
Successfully designed and implemented all major UML diagrams for a Library Management
System using PlantUML Tool Kits. Each diagram clearly visualizes the system's functional, structural, and
behavioural aspects, helping in better analysis and design of the application.
Ex. No: 02 Automatic Teller Machine (ATM)
Aim:
To design and implement various UML diagrams for an ATM System using PlantUML,
demonstrating functional and structural modeling of the system.
Algorithm:
1. Identify system actors and major use cases.
2. Define the static structure with classes and associations.
3. Model workflow using Activity Diagram.
4. Show interactions using Sequence and Collaboration Diagrams.
5. Capture object states using State Diagram.
6. Describe system components and deployment environment.
Code and Diagrams:
1. Use Case Diagram
@startuml
left to right direction
actor Customer
actor BankDatabase
rectangle "ATM System" {
(Insert Card)
(Enter PIN)
(Withdraw Cash)
(Deposit Cash)
(Check Balance)
(Transfer Funds)
}
Customer --> (Insert Card)
Customer --> (Enter PIN)
Customer --> (Withdraw Cash)
Customer --> (Deposit Cash)
Customer --> (Check Balance)
Customer --> (Transfer Funds)
(Enter PIN) --> BankDatabase : <<include>>
(Withdraw Cash) --> BankDatabase : <<include>>
(Deposit Cash) --> BankDatabase : <<include>>
(Check Balance) --> BankDatabase : <<include>>
(Transfer Funds) --> BankDatabase : <<include>>
@enduml
Output: Use Case Diagram for ATM
2. Class Diagram
@startuml
class ATM {
- cardInserted: boolean
- pinEntered: boolean
+ insertCard()
+ enterPIN()
+ withdraw()
+ deposit()
+ checkBalance()
}
class BankDatabase {
- accounts: List
+ validatePIN()
+ getBalance()
+ updateBalance()
}
class Customer {
- name: String
- accountNumber: int
}
ATM --> BankDatabase
ATM --> Customer
@enduml
Output: Class Diagram for ATM
3. Activity Diagram
@startuml
start
:Insert Card;
:Enter PIN;
if (Valid?) then (yes)
:Select Transaction;
if (Withdraw?) then (yes)
:Enter Amount;
:Dispense Cash;
else
if (Deposit?) then (yes)
:Insert Envelope;
else
:Show Balance;
endif
endif
:Print Receipt;
else
:Display Error;
endif
stop
@enduml
Output: Activity Diagram for ATM
4. Sequence Diagram
@startuml
actor Customer
participant ATM
participant BankDatabase
Customer -> ATM : insertCard()
Customer -> ATM : enterPIN()
ATM -> BankDatabase : validatePIN()
BankDatabase --> ATM : validationStatus
Customer -> ATM : requestWithdrawal()
ATM -> BankDatabase : processWithdrawal()
BankDatabase --> ATM : success
ATM -> Customer : dispenseCash()
@enduml
Output: Sequence Diagram for ATM
5. Collaboration Diagram
@startuml
skinparam linetype ortho
skinparam dpi 150
' Smaller font for messages
skinparam sequence {
FontSize 10
MessageSpacing 40
ParticipantSpacing 120
ArrowThickness 1
}
' Use rectangles with colors to have bigger, clearer boxes
rectangle "Customer" as Customer #LightSkyBlue
rectangle "ATM" as ATM #LightGreen
rectangle "Bank Database" as BankDatabase #LightYellow
' Invisible arrows to space objects horizontally
Customer -[hidden]-> ATM
ATM -[hidden]-> BankDatabase
Customer -> ATM : 1. insertCard()
Customer -> ATM : 2. enterPIN()
ATM -> BankDatabase : 3. validatePIN()
BankDatabase --> ATM : 4. validationStatus()
Customer -> ATM : 5. requestWithdrawal()
ATM -> BankDatabase : 6. processWithdrawal()
BankDatabase --> ATM : 7. transactionSuccess()
ATM -> Customer : 8. dispenseCash()
@enduml
Output: Collaboration Diagram for ATM
6. State Diagram
@startuml
[*] --> Idle
Idle --> CardInserted : insertCard()
CardInserted --> PINEntered : enterPIN()
PINEntered --> TransactionSelected : selectTransaction()
TransactionSelected --> Processing : confirm()
Processing --> Idle : complete
Processing --> Error : failure
Error --> Idle
@enduml
Output: State Diagram for ATM
7. Component Diagram
@startuml
package "ATM Software" {
[ATM UI]
[Transaction Processor]
[Banking Service Interface]
}
[ATM UI] --> [Transaction Processor]
[Transaction Processor] --> [Banking Service Interface]
@enduml
Output: Component Diagram for ATM
8. Deployment Diagram
@startuml
node "ATM Machine" {
component "ATM Software"
}
node "Bank Server" {
component "Banking Database"
}
"ATM Software" --> "Banking Database"
@enduml
Output: Deployment Diagram for ATM
Result:
Thus, the UML diagrams for the ATM System were successfully drawn using PlantUML and
analysed to understand the system’s functionality, structure, and interactions.
Ex. No: 03 Student Information Management System
Aim:
To design and implement various UML diagrams for a Student Information Management System
using PlantUML, demonstrating the functional and structural modeling of the system.
Algorithm:
1. Identify system actors and major use cases.
2. Define the static structure with classes and associations.
3. Model workflow using Activity Diagram.
4. Show interactions using Sequence and Collaboration Diagrams.
5. Capture object states using State Diagram.
6. Describe system components and deployment environment.
Code and Diagrams:
1. Use Case Diagram
@startuml
left to right direction
actor Student
actor Admin
rectangle "Student Information Management System" {
(Login)
(View Profile)
(Update Details)
(Logout)
}
Student --> (Login)
Student --> (View Profile)
Student --> (Update Details)
Student --> (Logout)
Admin --> (Login)
Admin --> (View Profile)
Admin --> (Update Details)
Admin --> (Logout)
@enduml
Output: Use Case Diagram for Student Information Management System
2. Class Diagram
@startuml
class Student {
-studentId: int
-name: String
-email: String
+login()
+viewProfile()
+updateProfile()
}
class Admin {
-adminId: int
-username: String
+login()
+manageStudents()
}
class Database {
+connect()
+fetchStudentData()
+updateStudentData()
}
Student --> Database : uses
Admin --> Database : manages
@enduml
Output: Class Diagram for Student Information Management System
3. Activity Diagram
@startuml
start
:Login;
if (Valid?) then (yes)
:View Profile;
:Update Details;
else (no)
:Show Error;
endif
:Logout;
stop
@enduml
Output: Activity Diagram for Student Information Management System
4. Sequence Diagram
@startuml
actor Student
participant "Web Portal" as Portal
participant "Database" as DB
Student -> Portal : login()
Portal -> DB : validateCredentials()
DB --> Portal : credentialsStatus()
Portal -> Student : loginSuccess()
Student -> Portal : viewProfile()
Portal -> DB : fetchStudentData()
DB --> Portal : studentData
Portal -> Student : displayProfile()
@enduml
Output: Sequence Diagram for Student Information Management System
5. Collaboration Diagram
@startuml
skinparam linetype ortho
skinparam dpi 150
skinparam sequence {
FontSize 10
MessageSpacing 40
ParticipantSpacing 120
ArrowThickness 1
}
rectangle "Student" as Student #LightSkyBlue
rectangle "Web Portal" as Portal #LightGreen
rectangle "Admin Database" as AdminDB #LightYellow
Student -[hidden]-> Portal
Portal -[hidden]-> AdminDB
Student -> Portal : 1. login()
Portal -> AdminDB : 2. validateCredentials()
AdminDB --> Portal : 3. authSuccess()
Student -> Portal : 4. updateDetails()
Portal -> AdminDB : 5. saveData()
AdminDB --> Portal : 6. updateStatus()
Portal -> Student : 7. confirmation()
@enduml
Output: Collaboration Diagram for Student Information Management System
6. State Diagram
@startuml
[*] --> LoggedOut
LoggedOut --> LoggedIn : login()
LoggedIn --> Viewing : viewProfile()
Viewing --> Updating : editDetails()
Updating --> LoggedIn : saveChanges()
LoggedIn --> LoggedOut : logout()
@enduml
Output: State Diagram for Student Information Management System
7. Component Diagram
@startuml
package "Student Info System" {
[User Interface]
[Student Service]
[Database Connector]
}
[User Interface] --> [Student Service]
[Student Service] --> [Database Connector]
@enduml
Output: Component Diagram for Student Information Management System
8. Deployment Diagram
@startuml
node "Client PC" {
component "UI Module"
}
node "Application Server" {
component "Business Logic"
}
node "Database Server" {
component "Student Database"
}
"UI Module" --> "Business Logic"
"Business Logic" --> "Student Database"
@enduml
Output: Deployment Diagram for Student Information Management System
Result:
Thus, the UML diagrams for the Student Information Management System were successfully
drawn using PlantUML and analysed to understand the system’s functionality, structure, and interactions.
Ex. No: 04 Matrimony Service
Aim:
To design and implement various UML diagrams for a Matrimony Service System using
PlantUML, demonstrating the functional and structural modeling of the system.
Algorithm:
1. Identify system actors and major use cases.
2. Define the static structure with classes and associations.
3. Model workflow using Activity Diagram.
4. Show interactions using Sequence and Collaboration Diagrams.
5. Capture object states using State Diagram.
6. Describe system components and deployment environment.
Code and Diagrams:
1. Use Case Diagram
@startuml
left to right direction
actor User
actor Admin
rectangle "Matrimony Service System" {
(Register)
(Login)
(Search Profile)
(Send Interest)
(Receive Requests)
(Logout)
}
User --> (Register)
User --> (Login)
User --> (Search Profile)
User --> (Send Interest)
User --> (Receive Requests)
User --> (Logout)
Admin --> (Login)
Admin --> (Search Profile)
Admin --> (Logout)
@enduml
Output: Use Case Diagram for Matrimony Service System
2. Class Diagram
@startuml
class User {
-userId: int
-name: String
-age: int
-gender: String
+register()
+login()
+searchProfile()
+sendInterest()
}
class Admin {
-adminId: int
-username: String
+login()
+manageUsers()
}
class MatchmakingService {
+findMatches()
+sendNotification()
}
User --> MatchmakingService
Admin --> MatchmakingService
@enduml
Output: Class Diagram for Matrimony Service System
3. Activity Diagram
@startuml
start
:User Registers;
:User Logs In;
if (Valid?) then (yes)
:Search Profiles;
:Send Interest;
:Receive Requests;
else (no)
:Show Error;
endif
:Logout;
stop
@enduml
Output: Activity Diagram for Matrimony Service System
4. Sequence Diagram
@startuml
actor User
participant "Web Portal" as Portal
participant "Database" as DB
User -> Portal : register()
Portal -> DB : saveUser()
DB --> Portal : success
User -> Portal : login()
Portal -> DB : validateUser()
DB --> Portal : validationStatus
Portal -> User : loginSuccess
User -> Portal : searchProfile()
Portal -> DB : getMatchingProfiles()
DB --> Portal : profiles
Portal -> User : displayResults
@enduml
Output: Sequence Diagram for Matrimony Service System
5. Collaboration Diagram
@startuml
skinparam linetype ortho
skinparam dpi 150
skinparam sequence {
FontSize 10
MessageSpacing 40
ParticipantSpacing 120
ArrowThickness 1
}
rectangle "User" as User #LightSkyBlue
rectangle "Portal" as Portal #LightGreen
rectangle "Database" as DB #LightYellow
User -[hidden]-> Portal
Portal -[hidden]-> DB
User -> Portal : 1. register()
Portal -> DB : 2. saveUser()
DB --> Portal : 3. success
User -> Portal : 4. login()
Portal -> DB : 5. validateUser()
DB --> Portal : 6. status
@enduml
Output: Collaboration Diagram for Matrimony Service System
6. State Diagram
@startuml
[*] --> Unregistered
Unregistered --> Registered : register()
Registered --> LoggedIn : login()
LoggedIn --> Searching : searchProfile()
Searching --> LoggedIn : viewMatches()
LoggedIn --> LoggedOut : logout()
@enduml
Output: State Diagram for Matrimony Service System
7. Component Diagram
@startuml
package "Matrimony Platform" {
[User Interface]
[Matching Engine]
[Notification Service]
[Database Service]
}
[User Interface] --> [Matching Engine]
[Matching Engine] --> [Database Service]
[Matching Engine] --> [Notification Service]
@enduml
Output: Component Diagram for Matrimony Service System
8. Deployment Diagram
@startuml
node "User Device" {
component "Web/Mobile UI"
}
node "App Server" {
component "Matching Engine"
component "Notification Module"
}
node "Database Server" {
component "User DB"
}
"Web/Mobile UI" --> "Matching Engine"
"Matching Engine" --> "User DB"
"Matching Engine" --> "Notification Module"
@enduml
Output: Deployment Diagram for Matrimony Service System
Result:
Thus, the UML diagrams for the Matrimony Service System were successfully drawn using
PlantUML and analysed to understand the system’s functionality, structure, and interactions.
Ex. No: 05 Stock Management System
Aim:
To design and implement various UML diagrams for a Stock Management System using PlantUML,
demonstrating the functional and structural modeling of the system.
Algorithm:
1. Identify system actors and key use cases.
2. Define static structure using class diagram.
3. Depict workflow using activity diagram.
4. Illustrate interactions via sequence and collaboration diagrams.
5. Represent object states with state diagram.
6. Model system architecture with component and deployment diagrams.
Code and Diagrams:
1. Use Case Diagram
@startuml
left to right direction
actor Admin
actor Manager
rectangle "Stock Management System" {
(Add Product)
(Update Stock)
(View Stock)
(Generate Report)
(Login)
(Logout)
}
Admin --> (Add Product)
Admin --> (Update Stock)
Admin --> (Generate Report)
Admin --> (Login)
Admin --> (Logout)
Manager --> (View Stock)
Manager --> (Generate Report)
Manager --> (Login)
Manager --> (Logout)
@enduml
Output: Use Case Diagram for Stock Management System
2. Class Diagram
@startuml
class Product {
-productId: int
-name: String
-quantity: int
-price: float
+addProduct()
+updateStock()
+getDetails()
}
class Admin {
-adminId: int
+login()
+manageStock()
}
class Manager {
-managerId: int
+viewStock()
+generateReport()
}
Admin --> Product
Manager --> Product
@enduml
Output: Class Diagram for Stock Management System
3. Activity Diagram
@startuml
start
:Login;
if (Authenticated?) then (yes)
:Select Action;
if (Add/Update?) then (yes)
:Add/Update Product;
else
:View Stock;
:Generate Report;
endif
:Logout;
else
:Display Error;
endif
stop
@enduml
Output: Activity Diagram for Stock Management System
4. Sequence Diagram
@startuml
actor Admin
participant "Stock UI" as UI
participant "Database" as DB
Admin -> UI : login()
UI -> DB : validateUser()
DB --> UI : authStatus
Admin -> UI : addProduct()
UI -> DB : insertProduct()
DB --> UI : success
@enduml
Output: Sequence Diagram for Stock Management System
5. Collaboration Diagram
@startuml
skinparam linetype ortho
skinparam dpi 150
skinparam sequence {
FontSize 10
MessageSpacing 40
ParticipantSpacing 120
ArrowThickness 1
}
rectangle "Admin" as Admin #LightSkyBlue
rectangle "Stock UI" as UI #LightGreen
rectangle "Database" as DB #LightYellow
Admin -[hidden]-> UI
UI -[hidden]-> DB
Admin -> UI : 1. login()
UI -> DB : 2. validateUser()
DB --> UI : 3. status
Admin -> UI : 4. addProduct()
UI -> DB : 5. insertProduct()
DB --> UI : 6. success
@enduml
Output: Collaboration Diagram for Stock Management System
6. State Diagram
@startuml
[*] --> LoggedOut
LoggedOut --> LoggedIn : login()
LoggedIn --> StockViewed : viewStock()
StockViewed --> ReportGenerated : generateReport()
ReportGenerated --> LoggedIn
LoggedIn --> LoggedOut : logout()
@enduml
Output: State Diagram for Stock Management System
7. Component Diagram
@startuml
package "Stock Management" {
[UI Module]
[Stock Controller]
[Report Generator]
[DB Access Layer]
}
[UI Module] --> [Stock Controller]
[Stock Controller] --> [DB Access Layer]
[Stock Controller] --> [Report Generator]
@enduml
Output: Component Diagram for Stock Management System
8. Deployment Diagram
@startuml
node "Client Machine" {
component "Stock UI"
}
node "Application Server" {
component "Stock Logic"
component "Report Service"
}
node "Database Server" {
component "Stock DB"
}
"Stock UI" --> "Stock Logic"
"Stock Logic" --> "Stock DB"
"Stock Logic" --> "Report Service"
@enduml
Output: Deployment Diagram for Stock Management System
Result:
Thus, the UML diagrams for the Stock Management System were successfully created using
PlantUML, clearly illustrating its functionality, interactions, and deployment structure.