Library Management Project
Library Management Project
SYNOPSIS
Introduction:
Objective:
Project Scope:
Purpose:
MODULES
Main Modules:
Admin Login
Librarian Login
Sub Modules:
Add Librarian
View Librarian
Delete Librarian
Add Books
View Books
Issue Book
View Issued Books
Return Book
1. SYSTEM REQUIREMENT
2. SOFTWARE USED
Java is used as front-end tool for developing the project. To run Java there is no
need to have any particular operating system, as it is platform independent. This
must have certain hardware and software installed on your computer.
The key considerations were summed up by the Java team in the following list of
buzzwords:
Simple
Security
Portability
Object-Oriented
Robust
Multithreaded
Architecture-Neural
Interpreted
High Performance
Distributed
Dynamic
You’ve already been introduced to the JVM. It’s the base for the Java platform and
is ported onto various hardware-based platforms.
The Java API is a large collection of ready-made software components that
provides many useful capabilities, such as graphical user interface (GUI) widgets.
The API is grouped into libraries of related classes and interfaces; these libraries
are known as packages.
JDK is an acronym for Java Development Kit. The Java Development Kit
(JDK) is a software development environment which is used to develop Java
applications and applets. It physically exists. It contains JRE + development tools.
JDK is an implementation of any one of the below given Java Platforms released
by Oracle Corporation:
The JDK contains a private Java Virtual Machine (JVM) and a few other resources
such as an interpreter/loader (java), a compiler (javac), an archiver (jar), a
documentation generator (Javadoc), etc. to complete the development of a Java
Application.
MYSQL Workbench:
My Sql Workbench
Backend:
MySQL (Database)
3. SAMPLE CODING
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.awt.Font;
import java.awt.Color;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JPasswordField;
EventQueue.invokeLater(new Runnable() {
try {
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();}
}});
public AdminLogin() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(contentPane);
lblAdminLoginForm.setForeground(Color.GRAY);
lblAdminLoginForm.setFont(newFont("Tahoma",Font.PLAI18));
textField.setColumns(10);
btnLogin.addActionListener(new ActionListener() {
String name=textField.getText();
String password=String.valueOf(passwordField.getPassword());
if(name.equals("admin")&&password.equals("admin123")){
AdminSuccess.main(new String[]{});
frame.dispose();
}else
JOptionPane.showMessageDialog(AdminLogin.this,"Sorry,Username or
Password Error","Login Error!", JOptionPane.ERROR_MESSAGE);
textField.setText("");
passwordField.setText("");
}}
});
gl_contentPane.setHorizontalGroup(gl_contentPane.createParallelGroup(Alignme
nt.TRAILING).addGroup(gl_contentPane.createSequentialGroup().addGroup(gl_c
ontentPane.createParallelGroup(Alignment.LEADING).addGroup(gl_contentPane.
createSequentialGroup()
.addGap(124).addComponent(lblAdminLoginForm))
.addGroup (gl_contentPane.createSequentialGroup()
.addGap(19)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addComponent(lblEnterName)
.addComponent(lblEnterPassword)).addGap(47)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING, false)
.addComponent(passwordField)
.addComponent(textField,GroupLayout.DEFAULT_SIZE,172,
Short.MAX_VALUE)))).addContainerGap(107, Short.MAX_VALUE))
.addGroup(gl_contentPane.createSequentialGroup()
.addContainerGap(187, Short.MAX_VALUE)
.addComponent(btnLogin, GroupLayout.PREFERRED_SIZE,
86, GroupLayout.PREFERRED_SIZE)
.addGap(151)));
gl_contentPane.setVerticalGroup(
gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup() .addCompo
nent(lblAdminLoginForm).addGap(26)
.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE).addComp
onent(lblEnterName)
.addComponent(textField,GroupLayout.PREFERRED_SIZE,
GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addGap(28)
.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
.addComponent(lblEnterPassword)
.addComponent(passwordField,GroupLayout.PREFERRED_SIZE,GroupLayout.
DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addGap(18)
.addComponent(btnLogin,GroupLayout.PREFERRED_SIZE,37,
GroupLayout.PREFERRED_SIZE)
.addContainerGap(80, Short.MAX_VALUE)));
contentPane.setLayout(gl_contentPane);
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.awt.Font;
import java.awt.Color;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JPasswordField;
/**
*/
EventQueue.invokeLater(new Runnable() {
try {
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
});
/**
*/
public LibrarianLogin() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(contentPane);
lblAdminLoginForm.setForeground(Color.BLACK);
textField.setColumns(10);
btnLogin.addActionListener(new ActionListener() {
String name=textField.getText();
String password=String.valueOf(passwordField.getPassword());
//System.out.println(name+" "+password);
if(LibrarianDao.validate(name, password)){
LibrarianSuccess.main(new String[]{});
frame.dispose();
}else
textField.setText("");
passwordField.setText("");
});
gl_contentPane.setHorizontalGroup(
gl_contentPane.createParallelGroup(Alignment.TRAILING)
.addGroup(gl_contentPane.createSequentialGroup(
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup().addGap(124)
.addComponent(lblAdminLoginForm))
.addGroup(gl_contentPane.createSequentialGroup().addGap(19)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADIN
G)
.addComponent(lblEnterName)
.addComponent(lblEnterPassword))
.addGap(47)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING, false)
.addComponent(passwordField)
.addContainerGap(107, Short.MAX_VALUE))
.addGroup(gl_contentPane.createSequentialGroup()
.addContainerGap(187, Short.MAX_VALUE)
gl_contentPane.setVerticalGroup(
gl_contentPane.createParallelGroup(Alignment.LEADING)
S.S.A.GOVT FIRST GRADE [AUTONOMOUS] COLLEGE BALLARI Page 19
Library Management System
.addGroup(gl_contentPane.createSequentialGroup()
.addComponent(lblAdminLoginForm)
.addGap(26)
.addGroup(gl_contentPane.createParallelGroup(Alignment.BASEL INE)
.addComponent(lblEnterName)
.addComponent(textField,
GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
GroupLayout.PREFERRED_SIZE)).addGap(28)
.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
.addComponent(lblEnterPassword)
.addComponent(passwordField, GroupLayout.PREFERRED_SIZE,
GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addGap(18)
.addContainerGap(80, Short.MAX_VALUE)));
contentPane.setLayout(gl_contentPane);
}}
4. SCREEN SHOTS
Home Page:
Admin Section:
Librarian Form:
View librarian:
Delete Librarian :
Books Form:
View Books:
Return Book:
5. TESTING
S.S.A.GOVT FIRST GRADE [AUTONOMOUS] COLLEGE BALLARI Page 25
Library Management System
The process of software testing aims not only at finding faults in the existing
software but also at finding measures to improve the software in terms of
efficiency, accuracy, and usability. It mainly aims at measuring the specification,
functionality, and performance of a software program or application.
1. Verification: It refers to the set of tasks that ensure that the software
correctly implements a specific function.
2. Validation: It refers to a different set of tasks that ensure that the software
that has been built is traceable to customer requirements.
1. Manual Testing:
Manual testing includes testing software manually, i.e., without using any
automation tool or any script. In this type, the tester takes over the role of an end-
user and tests the software to identify any unexpected behavior or bug. There are
different stages for manual testing such as unit testing, integration testing, system
testing, and user acceptance testing.
Testers use test plans, test cases, or test scenarios to test software to ensure the
completeness of testing. Manual testing also includes exploratory testing, as
testers explore the software to identify errors in it.
2. Automation Testing:
Apart from regression testing, automation testing is also used to test the
application from a load, performance, and stress point of view. It increases the
test coverage, improves accuracy, and saves time and money when compared to
manual testing.
White box sometimes called “Glass box testing” is a test case design uses
the control structure of the procedural design to drive test case.
Using white box testing methods, the following tests were made on the system.
a) All independent paths within a module have been exercised all once. In our
system, ensuring that case was selected and executed checked all case
structures. The bugs were prevailing in some part of the code where fixed.
b) All logical decisions were checked for the truth and falsity of the values.
a) Interface errors
b) Performance in data structure
c) Performance errors
d) Initializing and termination errors.
6. MAINTENANCE
Adaptive Maintenance:
Is applied when changes in the external environment precipitate modifications to
software. It deals with adapting the software to new environment.
Corrective Maintenance:
Acts to correct errors that are uncovered after the software is in use. It deals with
fixing bugs in the code.
Perfective Maintenance:
Incorporates enhancements that are requested by user community. It deals with
updating the software according to changes in user requirements.
Preventive Maintenance:
Improves for future maintainability and reliability and provides a basis future
enhancement. It deals with updating documentation and making the software more
maintainable. Tasks performed during the software engineering process define
maintainability and have and important impact in the success of any maintenance
approach. Reverse Engineering and Reengineering are the tools and techniques
used to maintain the project.
There are four major problems that can slow down the maintenance process.
Unstructured Code
Maintenance programmers having insufficient knowledge of the system
Documentation being absent
Out of Date, or at best insufficient
The success of the maintenance phase relies on these problems being fixed
earlier in the life cycle.
7. CONCLUSION
This project mainly focuses on how we can improve the traditional method
of working of a library because the traditional method includes doing all the things
in manual mode which is slow, less efficient, less secure, and difficult to manage.
The solution to this is an library management system which take care of all the
work by automating and digitizing the whole process. Our application is based on
Java and is linked to a relational database (MySQL). The frontend part has been
coded using Java and its packages like awt and swing. The backend is supported
and connected with database using java, its libraries and APIs. With the increase in
the workload of the library, new features can be added to the existing application
to make it relevant in the future as well.
8. FUTURE ENHANCEMENT
This desktop application involves almost all the basic features of the
library management. The project has a very vast scope in future. The project
can be implemented on intranet in future. Project can be updated in near
future as and when requirement for the same arises, as it is very flexible in
terms of expansions. With the proposed software of database library
management is system ready and fully functional to the admin and students
were now able to manage and hence run the entire work in a much better,
accurate, secure, and error free manner. We can make this application as an
android application which is very helpful to the user and the library authority.
9. BIBLIOGRAPHY
Web Sites:
https://www.javatpoint.com/java-tutorial
https://www.w3schools.com/java/
https://www.tutorialspoint.com/java/index.htm