Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Case Study: Library Management System with UML

Scenario: Imagine developing a library management system that allows users (librarians and patrons) to
interact with the library's collection.

Conceptual View:

UML Class Diagram:

 Classes:

o Member: Represents a library member (patron) with attributes like name, ID, contact
information, and borrowing history.

o Librarian: A subclass of Member with additional attributes like employee ID and


functionalities specific to librarians (e.g., adding new books).

o Book: Represents a book in the library with attributes like title, author, ISBN, publication
date, and availability status (available, borrowed, overdue).

o Loan: Represents a loan of a book to a member, with attributes like due date, date
borrowed, and references to the Member and Book involved.

 Relationships:

o Member and Librarian - Inheritance relationship (Librarian inherits attributes and


behaviors from Member)

o Member - Association relationship with Loan (a member can have multiple loans)

o Book - Association relationship with Loan (a book can be involved in multiple loans)

Technical View:

UML Sequence Diagram (focusing on borrowing a book):

 Objects:

o Member object representing the patron borrowing the book.

o Librarian object assisting with the borrowing process.

o Book object representing the specific book being borrowed.

o Library System object representing the core system functionality.

 Messages:

1. Member -> Library System: Requests to borrow a specific book (identified by title or
ISBN).

2. Library System -> Book: Checks book availability in the system database.
3. (If available) Library System -> Librarian: Requests confirmation for loan from librarian
(optional step for certain book categories).

4. Librarian -> Library System: Confirms or denies the loan request.

5. (If approved) Library System -> Book: Updates book status to borrowed and assigns it to
the Member.

6. (If approved) Library System -> Member: Provides confirmation and loan details (due
date etc.)

Benefits of using UML in this case study:

 Conceptual View: Provides a clear understanding of the system's entities (classes) and their
relationships. This helps in defining functionalities and data structures.

 Technical View: Illustrates the interaction flow between objects during specific actions
(borrowing a book in this case). This aids in developing the system logic and user interface.

OR

Case Study: Automated Parking Management System with UML

This case study explores how UML can be used to design an Automated Parking Management System
(APMS).

Conceptual View:

 Actors:

o Drivers: Interact with the system to enter, pay for, and exit the parking facility.

o System Administrator: Manages parking rates, tracks system health, and generates
reports.

 Use Cases:
o Driver Enters Parking Lot: Identifies license plate, checks for available space, opens gate.

o Driver Pays for Parking: Chooses payment method, confirms payment details.

o Driver Exits Parking Lot: Scans license plate or ticket, verifies payment, opens gate.

o System Administrator Manages Rates: Sets parking fees for different durations and
vehicle types.

o System Administrator Monitors System Health: Tracks sensor data (parking space
availability, gate functionality) and generates alerts for malfunctions.

Technical View:

 Classes:

o Vehicle: Stores data like license plate number, vehicle type.

o ParkingSpace: Tracks availability, location within the lot.

o Payment: Represents different payment methods (cash, credit card).

o EntryExitStation: Handles license plate scanning, payment processing, and gate control.

o SystemMonitor: Monitors sensor data and triggers alerts.

 Relationships:

o Vehicle interacts with ParkingSpace (occupies a space).

o EntryExitStation interacts with Vehicle (scans license plate) and Payment (processes
payment).

o System Administrator manages ParkingSpace and Payment options.

o SystemMonitor interacts with EntryExitStation (receives sensor data) and triggers alerts.

Benefits of using UML:

 Clear Communication: UML diagrams provide a visual language for developers, stakeholders,
and system administrators to understand the system's functionality and interactions between
components.

 Early Design Decisions: Identifying use cases and classes helps define the system's scope and
functionalities early in the development phase.

 Improved Maintainability: Well-documented UML diagrams can make future modifications and
maintenance of the system easier.

Example UML Diagrams:

1. Use Case Diagram:


This diagram would illustrate the actors (Drivers, System Administrator) and their interactions with the
system through use cases (entering/exiting, paying, managing rates, monitoring).

2. Class Diagram:

This diagram would show the main classes (Vehicle, ParkingSpace, Payment, etc.), their attributes, and
relationships (associations) between them.

Conceptual vs. Technical View:

 The conceptual view focuses on the functionalities and interactions from the user's perspective
(drivers, administrator) without delving into technical details.

 The technical view dives deeper into the system's internal structure, representing classes, their
attributes, and how they interact with each other to realize the functionalities defined in the
conceptual view.

You might also like