0% found this document useful (0 votes)
15 views6 pages

OOSE Ass

The document outlines a Library Stock Maintenance System, detailing its use case diagram, domain model class diagram, sequence diagram, and collaboration diagram. It describes functionalities such as adding, removing, and checking book availability, managing inventory, and tracking borrowing transactions. The sequence diagram illustrates the process of a member borrowing a book, highlighting interactions between the member, library, transaction, and book.

Uploaded by

Bhuvanesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views6 pages

OOSE Ass

The document outlines a Library Stock Maintenance System, detailing its use case diagram, domain model class diagram, sequence diagram, and collaboration diagram. It describes functionalities such as adding, removing, and checking book availability, managing inventory, and tracking borrowing transactions. The sequence diagram illustrates the process of a member borrowing a book, highlighting interactions between the member, library, transaction, and book.

Uploaded by

Bhuvanesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Library Stock Maintenance System

Use case diagram:

Elements:
 Start: Represents the initiation point of the process.
 Action (Diamond): Represents a decision point or a choice
of actions that can be taken. In this context, it
signifies the user's selection of an operation related to
stock maintenance.
 Use Cases (Rectangles): Each rectangle represents a
specific functionality or goal that the system enables.
These are the primary actions a user would perform to
manage the library's book stock.
o Add Book / Add New Book: Represents the process of
adding a new book to the library's inventory. The
"Add Book" label likely refers to the user's initial
intention, while "Add New Book" represents the
actual system function.
o Remove Book / Remove Old Book: Represents the
process of removing an existing book from the
library's inventory. Similar to adding, "Remove
Book" is the user's intent, and "Remove Old Book" is
the system function.
o Check Stock / Check Stock Levels: Represents the
process of inquiring about the current stock levels
of books in the library. "Check Stock" is the user's
intent, and "Check Stock Levels" is the system
function.
o Update Inventory: This use case appears to be a
consequence of adding or removing a book. It
represents the system's action of updating the
underlying inventory records based on these
operations.
o Display Stock Levels: Represents the system's action
of showing the current stock levels to the user,
likely as a result of the "Check Stock" operation.
 End: Represents the termination point of a particular use
case flow.
 Arrows: Arrows indicate the flow of control or sequence
of actions. They show how the user's initial action leads
to specific system functionalities.

Domain Model Class Diagram:

Classes:
 Book:
o Attributes: title (String), author (String), ISBN
(String), isAvailable (boolean).
o Methods: addBook(), removeBook().
 Staff:
o Attributes: staffId (String), name (String).
o Methods: manageInventory().
 Member:
o Attributes: memberId (String), name (String), email
(String).
o Methods: borrowBook(), returnBook().
 Library:
o Attributes: name (String), address (String), books
(List of Book objects).
o Methods: addBook(), removeBook(), checkStock().
 Transaction:
o Attributes: transactionId (String), date (Date).
o Methods: borrowBook(), returnBook().
Relationships:
 Library contains Book: This is represented by an arrow
pointing from Library to Book labeled "contains". It
indicates that the Library class has a collection of Book
objects.
 Staff manages Library: This is represented by an arrow
pointing from Staff to Library labeled "manages". It
suggests that a Staff object is responsible for managing
the Library.
 Member makes Transaction: This is represented by an arrow
pointing from Member to Transaction labeled "makes". It
indicates that a Member object initiates a Transaction.
Functionality:
The diagram suggests the following functionalities for the
library management system:
 Adding, removing, and checking the availability of books.
 Managing the library's inventory, likely by staff
members.
 Borrowing and returning books by library members.
 Tracking transactions related to book borrowing and
returning.

Sequence Diagram:
The sequence diagram shows the interactions between
participants over time. We'll illustrate the process of a
member borrowing a book, including the interactions between
the Member, Library, Transaction, and Book.
1. Participants:
o Member (M): The library member requesting to borrow
a book.
o Library (L): The system that handles the borrowing
process.
o Transaction (T): Represents the borrowing event
created by the library.
o Book (B): The entity representing the book being
borrowed.

2. Flow of Events:
o Request: The member sends a request to the library
to borrow a specific book (M->>L: Request to borrow
Book).
o Check Availability: The library queries the book to
check if it is available (L->>B: Check
availability).
o Response on Availability: The book responds back to
the library indicating whether it is available or
not (B-->>L: Is Available?).
3. Conditional Logic (alt blocks):
o Yes Condition: If the book is available, the
following occurs:
 The library creates a new transaction to record
the borrowing action (L->>T: Create
Transaction).
 The transaction confirms back to the library
that it has been successfully created (T-->>L:
Confirm Transaction Created).
 Finally, the library communicates back to the
member confirming that the book has been
successfully borrowed (L-->>M: Success: Book
borrowed).
o No Condition: If the book is not available:
 The library informs the member that borrowing
is not possible due to unavailability (L-->>M:
Error: Book not available).

Collaboration Diagram:

In a collaboration diagram, we focus on the relationships and


interactions between the objects involved in the use case.
Here are the key objects involved in the borrowing process and
their collaboration:
1. Member: Requests to borrow a book.
2. Library: Manages the process of checking book
availability and creating a transaction.
3. Transaction: Represents the borrowing event.
4. Book: The actual item to be borrowed.

You might also like