0% found this document useful (0 votes)
972 views15 pages

Library Management System

The document describes creating a library management system using UML diagrams. Class, use case, deployment, component, statechart, collaboration, sequence, and activity diagrams are created to model the system. Code for the main classes - User, Librarian, System, and DBA - is generated from the UML models. The diagrams and code generation demonstrate modeling and implementing the library management system.

Uploaded by

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

Library Management System

The document describes creating a library management system using UML diagrams. Class, use case, deployment, component, statechart, collaboration, sequence, and activity diagrams are created to model the system. Code for the main classes - User, Librarian, System, and DBA - is generated from the UML models. The diagrams and code generation demonstrate modeling and implementing the library management system.

Uploaded by

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

EX NO: LIBRARY MANAGEMENT SYSTEM

DATE:

AIM
To design an object oriented model for Library Management System using Rational Rose
software and to implement it using Java.

PROBLEM STATEMENT
The library management system is a software system that issues books and magazines to
registered students only. The student has to login after getting registered to the system. The
borrower of the book can perform various functions such as searching for desired book, get the
issued book and return the book.
CLASS DIAGRAM
A class diagram in the unified modeling language is a type of static structure diagram that
describes the structure of a system by showing the system’s classes, their attributes, operations
and the relationships among objects. The library management system makes use of the following
classes user, librarian, system and DBA.
USE CASE DIAGRAM
Use case is a list of actions or events. Steps typically defining the interactions between a
role and a system to achieve a goal. The use case diagram consists of various functionality
performed by actors like user, librarian, system and DBA.

login

enter name and password <<actor>>


projection of

display page

requesting for book


user

display book details

search for book


librarian

issue book

return book

DBA
maintain database

logout
DEPLOYMENT DIAGRAM
Deployment diagram is a structure diagram which shows architecture of the system as
deployment of software artifacts to deployment target. It is the graph of nodes connected by
communication association. It is represented by three dimensional box. The device node is
library management system and execution environment nodes are user, librarian, system and
DBA.

library management
system

DBA
user

librarian
COMPONENT DIAGRAM
Component diagram shows the dependencies and interactions between software
components. Component diagram carries the most important living actors of the system i.e, user,
librarian and DBA.

library management
system

user DBA
librarian
STATECHART DIAGRAM
State chart diagram is also called as state machine diagram. The state chart diagram
contains the states in the rectangular boxes and the states are indicated by the dot enclosed. The
state chart diagram describes the behavior of the system. The state chart diagram involves eight
stages such as login, enter details, requesting for book, display book details, search book, issue
book, return book and logout.

login enter requesting display book


details for book details

logout return book issue book search


book
OUTPUT
//Source file: C:/Users/User/Desktop/ab/Dba.java

public class Dba

private string dbaName;

private integer dbPwd;

public Dba()

/**

@roseuid 59D07EC80314

*/

public void maintainDatabase()

//Source file: C:/Users/User/Desktop/ab/Librarian.java

public class Librarian

private string lname;

private integer lid;

private string lpwd;

public Librarian theLibrarian;

public System theSystem;

public Librarian()
{

/**

@roseuid 59D07E650105

*/

public void searchBook()

/**

@roseuid 59D07E6A029B

*/

public void issueBook()

//Source file: C:/Users/User/Desktop/ab/System.java

public class System

private integer sysNo;

public Dba theDba;

public System()

}
/**

@roseuid 59D07E8B0328

*/

public void displayPage()

/**

@roseuid 59D07E90034C

*/

public void displayBookDetails()

//Source file: C:/Users/User/Desktop/ab/User.java

public class User

private string username;

private integer userid;

private string userdept;

public System theSystem;

public Librarian theLibrarian;

public User()

}
/**

@roseuid 59D07E0401D5

*/

public void login()

/**

@roseuid 59D07E0A016F

*/

public void enterDetails()

/**

@roseuid 59D07E240232

*/

public void requestingBook()

/**

@roseuid 59D07E2B0185

*/

public void returnBook()

{
}

/**

@roseuid 59D07E310090

*/

public void logout()

}
COLLABORATION DIAGRAM
Like sequence diagram collaboration diagrams are also called as interaction diagram.
Collaboration diagram convey the same informations as sequence diagram but focus on the
object roles instead of the times that messages are sent. Here the actions between various classes
are represented by number format for the case of identification.

13: if valid
1: login
2: enter details
11: logout
12: requesting book
user system

5: display page
14: display page
6: requesting book 15: 3: check details
10: return book
9: issue book 7: search book

4: if valid

8: display details

librarian

dba
SEQUENCE DIAGRAM
A sequence diagram represent the sequence and interactions of a given use case or
scenario. Sequence diagram capture most of the information about the system. It is also represent
in order by which they occur and have the object in the system send message to one another.
Here the sequence starts with interaction between user and the system followed by database.
Once the book have been selected the next half of sequence starts between librarian and user
followed by database.

user system librarian dba

login

enter details
check details

if valid
display page

requesting book

search book

display details

issue book

return book

logout
ACTIVITY DIAGRAM
Activity diagram are graphical representation of workflows of stepwise activities and
actions with support for choice, iteration and concurrency. Here in the activity diagram the user
login to the system and perform some main activity which is the main key element to the system.

user system librarian DBA

login

enter details check details

display page if valid

request book

search book

display book
details
issue book

logout
RESULT
Thus the various UML diagrams for library management system was drawn and the code
was generated successfully.

You might also like