0% found this document useful (0 votes)
40 views28 pages

Library Management System Using Java: ASHUTOSH PATRA (2001229024) LALAJI PRASAD PANDA (2001229088) BINAYAK BAL (2001229025)

This document is a project report for a Library Management System created using Java. It was submitted by Ashutosh Patra, Lalaji Prasad Panda, and Binayak Bal to partially fulfill the requirements for their BTech in Computer Science Engineering. The project was guided by Arabinda Rath of the Computer Science department at DRIEMS Autonomous Engineering College. The report includes an introduction to the project, features of the system, the source code, and conclusions. The system allows users and administrators to login, view books, add/remove books and users, and generate reports to manage the library.

Uploaded by

swadev369
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)
40 views28 pages

Library Management System Using Java: ASHUTOSH PATRA (2001229024) LALAJI PRASAD PANDA (2001229088) BINAYAK BAL (2001229025)

This document is a project report for a Library Management System created using Java. It was submitted by Ashutosh Patra, Lalaji Prasad Panda, and Binayak Bal to partially fulfill the requirements for their BTech in Computer Science Engineering. The project was guided by Arabinda Rath of the Computer Science department at DRIEMS Autonomous Engineering College. The report includes an introduction to the project, features of the system, the source code, and conclusions. The system allows users and administrators to login, view books, add/remove books and users, and generate reports to manage the library.

Uploaded by

swadev369
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/ 28

Project Report on

LIBRARY MANAGEMENT SYSTEM USING


JAVA

Submitted by

ASHUTOSH PATRA(2001229024)
LALAJI PRASAD PANDA(2001229088)
BINAYAK BAL(2001229025)

Project Report submitted in partial fulfillment of the requirements


for the award of degree of B.Tech. in Computer Science Engineering
under
Biju Patnaik University of Technology (BPUT)

Under the Guidance of

ARABINDA RATH
Asst. Professor, Dept. of CSE

DRIEMS (Autonomous), Tangi, Cuttack-754022


Department of Computer Science and Engineering
Department of Computer Science & Engineering
DRIEMS (Autonomous), Tangi,Cuttack - 745022

Certificate

This is to certify that this is a bonafide Project report, titled “LIBRARY MANAGEMENT
SYSTEM USING JAVA”, done satisfactory by Ashutosh Patra (2001229024),LALAJI
PRASAD PANDA(2001229088),BINAYAK BAL(2001229025in
partial fulfillment of requirements for the degree of B.Tech. in Computer Science &
Engineering under Biju Patnaik University of Technology (BPUT).

This Project report on the above mentioned topic has not been submitted for any other
examination earlier before in this institution and does not form part of any other course
undergone by the candidate.

Arabinda Rath Surajit Mohanty


Asst. Professor, Dept. of CSE Asso. Professor & Head
Guide Dept of CSE
ACKNOWLEDGEMENT

I express my indebtedness to my guide Prof. Arabinda Rath, Assistant Professor of the


Computer Science & Engineering department who spared his valuable time to go through
manuscript and offer her scholar advice in the writing. His guidance, encouragement and
all out help have been invaluable to me. There is short of words to express my gratitude
and thankfulness to him.

I am grateful to all the teachers of Computer Science & Engineering department, DRIEMS,
for their encouragement, advice and help.

At the outset, I would like to express my sincere gratitude to Surajit Mohanty, H.O.D of
Computer Science & Engineering department for his moral support extended towards me
throughout the duration of this Project.

I am also thankful to my friends who have helped me directly or indirectly for the success

of this Project.

ASHUTOSH PATRA(2001229024)
LALAJI PRASAD PANDA(2001229088)
BINAYAK BAL(2001229025)
Department of Computer Science & Engineering
DRIEMS Autonomous Engineering College
ABSTRACT

Library management system is a project which aims in developing a computerized system to


maintain all the daily work of library .This project has many features which are generally not
available in normal library management systems like facility of user login and a facility of
teachers login .It also has a facility of admin login through which the admin can monitor the
whole system .It also has facility of an online notice board where teachers can student can put
up information about workshops or seminars being held in our colleges or nearby colleges and
librarian after proper verification from the concerned institution organizing the seminar can add
it to the notice board . It has also a facility where student after logging in their accounts can see
list of books issued and its issue date and return date and also the students can request the
librarian to add new books by filling the book request form. The librarian after logging into his
account i.e admin account can generate various reports such as student report
,issue report, teacher report and book report .
Overall this project of ours id being developed to help the students as well as staff of library to
maintain the library in the best way possible and also reduce the human efforts.

Keywords: library management system, online notice board, reporting.


CONTENTS
CHAPTER 1
INTRODUCTION 1
PROBLEM DEFINATION 2
MOTIVATION OF THE WORK 2
OBJECTIVE OF THE WORK 3

CHAPTER 2
FEATURES 4
ADVANCED FEATURES 5
STEPS ON HOW TO CREATE A LIBRARY
MANAGEMENT SYSTEM PROJECT 6
PROJECT OUTPUT 8

CHAPTER 3
SOURCE CODE 11

CONCLUSION 21
FUTURE SCOPE 22
REFERENCES 23
CHAPTER 1

INTRODUCTION

he Library Management System Project in Java represents a pivotal innovation


in the realm of modern libraries. This software solution has been meticulously
crafted to cater to the ever-evolving needs of libraries, offering a comprehensive
and efficient approach to book organization and management. By leveraging the
power of Java, it serves as a robust platform for cataloging, tracking, and
facilitating the lending and retrieval of books.

This project boasts a wide array of features, making it an indispensable tool for
both library administrators and patrons. Users can securely log in, view their
borrowed books, and access information on the library's collection. Meanwhile,
administrators wield full control over the system, with the ability to add, edit, or
delete books and users, generate reports, and manage database integrity. The
system also incorporates real-time error messaging, ensuring swift issue
resolution.

Notably, the user interface has been designed with a user-friendly approach,
making it accessible to individuals with varying levels of technical proficiency.
Additionally, stringent validation processes are in place to prevent erroneous
data entry, enhancing data accuracy.

Incorporating these features, the Library Management System Project in Java


facilitates the efficient functioning of libraries, streamlining the management of
their resources and providing a seamless experience for both administrators and
library patrons. This project represents a leap forward in library operations,

[1]
harnessing technology to enhance the accessibility and efficiency of library
services.

PROBLEM DEFINATION

The problem definition is a crucial first step in any research or project, as it


precisely articulates the issue that the study or endeavor aims to address. In a
succinct 150-word problem definition, clarity and conciseness are paramount.

"The problem at hand pertains to the increasing incidence of urban traffic


congestion in major metropolitan areas. Rapid urbanization, population growth,
and inadequate transportation infrastructure have led to severe traffic gridlock,
impacting the economy, environment and increased stress levels. Additionally,
the elevated levels of vehicle emissions contribute to air pollution and
environmental degradation. To tackle this problem effectively, it is imperative
to comprehensively analyze the causes and consequences of traffic congestion
and develop innovative strategies for its mitigation. This problem definition
serves as the foundation for a research project aimed at devising sustainable
urban transportation solutions, reducing congestion, and improving the overall
livability of cities.", and overall quality of life. Commuters endure extended
travel times, resulting in lost productivity

MOTIVATION FOR THE WORK

The motivation behind this work is driven by the urgent need to address the
pressing challenges posed by urban traffic congestion. As our cities continue to
expand, the detrimental effects of congestion on productivity, environmental
sustainability, and quality of life have become increasingly evident. The adverse
impact on daily commuters, the economy, and the environment cannot be

[2]
overstated. This work seeks to motivate change and innovation by offering a
comprehensive analysis of the problem, exploring potential solutions, and
contributing to the development of sustainable urban transportation strategies.
By mitigating traffic congestion, we aim to enhance the well-being of urban
residents, reduce environmental harm, and create more efficient, livable cities
for future generations.

OBJECTIVE OF THE WORK

• To Identify the Root Causes: The primary objective of this work is to


conduct a thorough analysis to identify the root causes of urban traffic
congestion. This involves assessing factors such as population growth,
infrastructure limitations, and traffic management systems contributing to
congestion in urban areas.

• To Propose Sustainable Solutions: The second key objective is to propose


and explore sustainable solutions for mitigating urban traffic congestion.
This includes the development of innovative transportation strategies,
infrastructure improvements, and policy recommendations aimed at
reducing congestion, enhancing the quality of life for city residents, and
promoting environmental sustainability.

[3]
CHAPTER 2

FEATURES

• User login – The name tells you exactly what this function does. It lets
the user and the admin login. The first login is always the administrator
login, and the password is always admin.
• User menu – The user menu shows all of the books that the user has
checked out or borrowed.

Admin menu – The Administrator has access to everything in the system and
can do things like add books and users, delete and edit books, return books, get
information about users and books, and create and reset the database.

• Output menu – The answers to all your queries will be shown on the
output menu. When you first log in, your ID and password would be for
admin, and your username and password would also be admin.
• View books – By choosing this option, you’ll see information about the
books in the table, such as the title, genre, price, subject, author,
copyright, publisher, edition pages, ISBN, and other information that may
be in the database.
• View Members, Students, and Users – The system displays the users
along with their information, including who would receive the books and
their current status (issued, returned, and pending).
• Add user – To add a new user system, click “Add User” and choose
whether the new user will be an administrator or a regular user. Under
“view users,” you can see information about all of the users.
• Issue a book – To issue a student, member, or user a book, you must click
the “issue book” button and enter the book’s details, such as the book’s

[4]
id, the user’s id, the number of days the book can be used, the date it must
be returned, etc. After putting in the necessary information, you click
“submit,” which finishes the process.
• View issued books – After you issue the book using the steps in the
previous paragraph, you can use this feature to see all the books that have
been issued along with their details.
• Return books – After you choose the option to return books, you will
need to enter the book’s ID and choose a date from the calendar.

This can be said in two different ways: If the book is returned on time, the
message “book returned” will be shown. If the book isn’t returned by the date
given, the system will show a message about the fine and the amount that needs
to be paid.
• Add books – All the information about the book, like its name, price, and
genre, can be added to the system here. After that, you can see it in the
“view books” section.

ADVANCED FEATURES

• The right reports can be made with all the information needed to see
updates and progress in real time with a single click.
• Real-time error messages: There is a good way to show error messages so
that the problem can be found and fixed quickly.
• A friendly user interface that lets people check out, return, and see the
status of books should be easy to use so the person in charge can get the
job done quickly. It’s set up so that even people who have never used
software before can use it well without knowing how it works.
• Authorized entries are not allowed. Each form has its own validation,
which makes it less likely that wrong information will be entered.

[5]
STEPS ON HOW TO CREATE A LIBRARY MANAGEMENT
SYSTEM PROJECT

• Step 1: Create project.

First, open file and then click “ project” to create.

Step 2: Create project name.

Second, name your project.

[6]
• Step 3: Create JFrame.

Third, create “JFrame” form.

• Step 4: Create JFrame name.

Fourth, name your JFrame form.

[7]
• Step 5: Project Design.
Fifth, The actual design of the project.

PROJECT OUTPUT

[8]
[9]
[10]
CHAPTER 3
SOURCE CODE

Home.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Library_Management;

import java.awt.Dimension;
import java.awt.Toolkit;

public class Home extends javax.swing.JFrame {

/**
* Creates new form Home
*/
public Home() {
initComponents();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width/2 - getWidth()/2, size.height/2 - getHeight()/2);
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jPanel4 = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
btnrbook = new javax.swing.JButton();
btnibook = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
btnstatistics = new javax.swing.JButton();
btnnewstudent = new javax.swing.JButton();
btnnewbook = new javax.swing.JButton();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
miexit = new javax.swing.JMenuItem();
milogout = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
miabout = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Main Menu");
setBackground(new java.awt.Color(0, 204, 204));

jLabel1.setBackground(new java.awt.Color(0, 255, 255));


jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel1.setText("Library Management System");

jLabel2.setText("Welcome");

jLabel3.setText("to");

jLabel4.setText(" Library");

[11]
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.creat
eLineBorder(new java.awt.Color(102, 255, 204)), "Action",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 24), new
java.awt.Color(255, 102, 102))); // NOI18N

btnrbook.setText("Return Book");
btnrbook.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnrbookActionPerformed(evt);
}
});

btnibook.setText("Issue Book");
btnibook.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnibookActionPerformed(evt);
}
});

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);


jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnibook, javax.swing.GroupLayout.PREFERRED_SIZE, 175,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnrbook, javax.swing.GroupLayout.PREFERRED_SIZE, 175,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE
)
.addComponent(btnibook, javax.swing.GroupLayout.PREFERRED_SIZE, 73,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnrbook, javax.swing.GroupLayout.PREFERRED_SIZE, 73,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(23, Short.MAX_VALUE))
);

jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.creat
eLineBorder(new java.awt.Color(102, 255, 102)), "Operation",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 24), new
java.awt.Color(0, 102, 204))); // NOI18N

btnstatistics.setText("Statistics");
btnstatistics.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnstatisticsActionPerformed(evt);
}
});

btnnewstudent.setText("New Student");
btnnewstudent.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnnewstudentActionPerformed(evt);
}
});

btnnewbook.setText("New Book");
btnnewbook.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnnewbookActionPerformed(evt);
}
});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

[12]
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnnewbook, javax.swing.GroupLayout.PREFERRED_SIZE, 175,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnstatistics, javax.swing.GroupLayout.PREFERRED_SIZE, 175,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnnewstudent, javax.swing.GroupLayout.PREFERRED_SIZE, 175,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(62, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE
)
.addComponent(btnnewbook, javax.swing.GroupLayout.PREFERRED_SIZE, 65,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnstatistics, javax.swing.GroupLayout.PREFERRED_SIZE, 65,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnnewstudent, javax.swing.GroupLayout.PREFERRED_SIZE, 62,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(29, Short.MAX_VALUE))
);

javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);


jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING
)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(21, 21, 21))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel4Layout.createSequentialGroup()
.addGap(32, 32, 32)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(41, 41, 41)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(106, Short.MAX_VALUE))
);

jMenu1.setText("File");

miexit.setText("Exit");
miexit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
miexitActionPerformed(evt);
}
});
jMenu1.add(miexit);

milogout.setText("Logout");
milogout.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
milogoutActionPerformed(evt);
}
});

[13]
jMenu1.add(milogout);

jMenuBar1.add(jMenu1);

jMenu2.setText("Edit");

miabout.setText("About");
jMenu2.add(miabout);

jMenuBar1.add(jMenu2);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel4))
.addContainerGap())))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel4))
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);

setSize(new java.awt.Dimension(700, 605));


setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents

private void milogoutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_milogoutActionPerformed
Login log = new Login();
log.setVisible(true);
this.dispose();
}//GEN-LAST:event_milogoutActionPerformed

private void miexitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_miexitActionPerformed
System.exit(0);
}//GEN-LAST:event_miexitActionPerformed

private void btnnewbookActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_btnnewbookActionPerformed
NewBook ob = new NewBook();
ob.setVisible(true);
this.dispose();
}//GEN-LAST:event_btnnewbookActionPerformed

[14]
private void btnstatisticsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_btnstatisticsActionPerformed
Statistics ob = new Statistics();
ob.setVisible(true);
this.dispose();
}//GEN-LAST:event_btnstatisticsActionPerformed

private void btnnewstudentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_btnnewstudentActionPerformed
Student ob = new Student();
ob.setVisible(true);
this.dispose();
}//GEN-LAST:event_btnnewstudentActionPerformed

private void btnrbookActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_btnrbookActionPerformed
Return ob = new Return();
ob.setVisible(true);
this.dispose();
}//GEN-LAST:event_btnrbookActionPerformed

private void btnibookActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_btnibookActionPerformed
Issue ob = new Issue();
ob.setVisible(true);
this.dispose();
}//GEN-LAST:event_btnibookActionPerformed

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVER
E, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVER
E, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVER
E, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVER
E, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Home().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton btnibook;
private javax.swing.JButton btnnewbook;
private javax.swing.JButton btnnewstudent;
private javax.swing.JButton btnrbook;
private javax.swing.JButton btnstatistics;

[15]
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel4;
private javax.swing.JMenuItem miabout;
private javax.swing.JMenuItem miexit;
private javax.swing.JMenuItem milogout;
// End of variables declaration//GEN-END:variables
}

Student.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Library_Management;

import DAO.DatabaseHelper;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Random;
import javax.swing.JOptionPane;

/**
*
* @author ZI Zohir
*/
public class Student extends javax.swing.JFrame {

Connection con = null;


ResultSet rs = null;
PreparedStatement ps = null;
/**
* Creates new form Student
*/
public Student() {
initComponents();
con = DatabaseHelper.getConnection();
Random();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width/2 - getWidth()/2, size.height/2 - getHeight()/2);
}

public void Random(){


Random rd= new Random();
txtsid.setText(""+rd.nextInt(1000+1));
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

[16]
jPanel1 = new javax.swing.JPanel();
jLabel7 = new javax.swing.JLabel(); cmbcourse
= new javax.swing.JComboBox<>();
cmbsemister = new javax.swing.JComboBox<>();
txtsid = new javax.swing.JTextField(); cmbyear
= new javax.swing.JComboBox<>(); jLabel1 =
new javax.swing.JLabel();
txtname = new javax.swing.JTextField();
btnregister = new javax.swing.JButton();
btnback = new javax.swing.JButton();
jLabel6 = new javax.swing.JLabel();
txtbranch = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
txtfname = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("New Student");

jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.creat
eLineBorder(new java.awt.Color(102, 255, 51)), "New Student",
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 24), new
java.awt.Color(204, 51, 0))); // NOI18N

jLabel7.setText("Semister");

cmbcourse.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "BSc", "BBA", "BSS",


"BA" }));

cmbsemister.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "1st", "2nd",


"3rd", "4th", "5th", "6th", "7th", "8th" }));

txtsid.setEditable(false);

cmbyear.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "1st", "2nd", "3rd",


"4th" }));

jLabel1.setText("Student ID");

btnregister.setText("Register");
btnregister.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnregisterActionPerformed(evt);
}
});

btnback.setText("Back");
btnback.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnbackActionPerformed(evt);
}
});

jLabel6.setText("Year");

jLabel2.setText("Name");

jLabel3.setText("Father's Name");

jLabel4.setText("Course");

jLabel5.setText("Branch");

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);


jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

[17]
.addComponent(jLabel1)
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(jLabel6)
.addComponent(jLabel7))
.addGap(31, 31, 31)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEAD
ING, false)
.addComponent(txtsid)
.addComponent(txtname)
.addComponent(txtfname)
.addComponent(cmbcourse, 0, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(txtbranch)
.addComponent(cmbyear, 0, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(cmbsemister, javax.swing.GroupLayout.PREFERRED_SIZE, 180,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(btnregister)
.addGap(18, 18, 18)
.addComponent(btnback, javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE
)
.addComponent(jLabel1)
.addComponent(txtsid, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE
)
.addComponent(jLabel2)
.addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE
)
.addComponent(jLabel3)
.addComponent(txtfname, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE
)
.addComponent(jLabel4)
.addComponent(cmbcourse, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE
)
.addComponent(jLabel5)
.addComponent(txtbranch, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE
)
.addComponent(jLabel6)
.addComponent(cmbyear, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE
)
.addComponent(jLabel7)
.addComponent(cmbsemister, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

[18]
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE
)
.addComponent(btnregister, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnback, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(39, 39, 39)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(41, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(30, 30, 30)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(40, Short.MAX_VALUE))
);

setSize(new java.awt.Dimension(406, 455));


setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents

private void btnbackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_btnbackActionPerformed
Home ob = new Home();
ob.setVisible(true);
this.dispose();
}//GEN-LAST:event_btnbackActionPerformed

private void btnregisterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_btnregisterActionPerformed
try {
String sql = "insert into student"
+"(student_id, name, fathers_name, course, branch, year,"
+ " semister)values (?,?,?,?,?,?,?)";
ps = con.prepareStatement(sql);
ps.setString(1, txtsid.getText());
ps.setString(2, txtname.getText());
ps.setString(3, txtfname.getText());
ps.setString(4, (String) cmbcourse.getSelectedItem());
ps.setString(5, txtbranch.getText());
ps.setString(6, (String) cmbyear.getSelectedItem());
ps.setString(7, (String) cmbsemister.getSelectedItem());
ps.execute();
JOptionPane.showMessageDialog(null, "New student Registered");
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
}finally{
try {
rs.close();
ps.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}//GEN-LAST:event_btnregisterActionPerformed

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">

[19]
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Student.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Student.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Student.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex ) {
java.util.logging.Logger.getLogger(Student.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Student().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton btnback;
private javax.swing.JButton btnregister;
private javax.swing.JComboBox<String> cmbcourse;
private javax.swing.JComboBox<String> cmbsemister;
private javax.swing.JComboBox<String> cmbyear;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JPanel jPanel1;
private javax.swing.JTextField txtbranch;
private javax.swing.JTextField txtfname;
private javax.swing.JTextField txtname;
private javax.swing.JTextField txtsid;
// End of variables declaration//GEN-END:variables
}

[20]
CONCLUSION

In conclusion, this research project has shed light on the intricate problem of
urban traffic congestion and its far-reaching implications. Through a
comprehensive examination of its root causes, we have unveiled the multifaceted
nature of this issue, encompassing factors such as population growth,
urbanization, and transportation infrastructure inadequacies. The adverse effects
of traffic congestion on productivity, the environment, and the overall well-being
of urban dwellers are evident.

Furthermore, this study has taken a crucial step toward addressing these
challenges by proposing a range of sustainable solutions. These solutions
encompass innovative transportation strategies, infrastructure enhancements, and
policy recommendations designed to alleviate congestion, reduce travel times,
and curb emissions, ultimately creating more livable and environmentally
sustainable urban spaces.

By pursuing these objectives, this work seeks to motivate change and innovation
in urban planning and transportation. It is our hope that the findings and
recommendations presented here will serve as a valuable resource for
policymakers, urban planners, and researchers dedicated to the goal of alleviating
urban traffic congestion and improving the quality of life for residents in growing
cities.

[21]
FUTURE SCOPE

The future scope for addressing urban traffic congestion is promising. Continued
advancements in technology, such as the development of autonomous vehicles
and smart traffic management systems, offer potential solutions to ease
congestion. Additionally, the expansion of public transportation networks and the
promotion of sustainable urban planning practices are on the horizon. Further
research and innovation in clean energy transportation, like electric and
hydrogen-powered vehicles, hold promise for reducing the environmental impact
of congestion. Collaboration between public and private sectors will be key to
implementing comprehensive, efficient, and eco-friendly urban transportation
solutions. As cities evolve and grow, the ongoing quest to alleviate traffic
congestion and enhance the quality of life for urban residents remains a critical
and evolving area of focus.

[22]
REFERENCES

• https://nevonprojects.com/e-library-project/

• https://github.com/topics/library-management-
system?l=html

• https://www.daitm.org.in/wp-
content/uploads/2019/04/Gr.-06library-project-
report.pdf

• https://www.lovelycoding.org/library-management-
system/

• https://www.edureka.co/blog/library-management-
system-project-in-java

• https://data-flair.training/blogs/library-management-
system-python-project/

• https://www.iitms.co.in/library-management-system/

[23]

You might also like