Professional Documents
Culture Documents
1. INTRODUCTION
1.1 OVERVIEW:
Library project system that offers many flexible and convenient features, allowing librarians
and li- brary users to maximize time and efficiency. Library System gives the all detailed
information about students, staff and books.
It will track on the how many books available in library and books issued to the students. It
shows popular book among the students.
It will provide book lost in library.
It keeps the record of the suppliers and book binders.
It generates MIS reports for management. Our software is
customizable for any library requirement.
1.2 Objective:
Library management software where admin can add/view/delete librarian and librarian
can add/view books, issue, view issued books and returnbooks.
a) Add Member
b) Add Books
c) Issued books
d) Return Books
e) View & Print Issued List
f) View & Print Pending List
2
Tools to be used:
Use any IDE to develop the project. It may be Eclipse /My eclipse / Net beans etc.
MariaDB for thedatabase.
1.3: SCOPE
The system accepts the General Library Transactions of book issue, return and
renewals for the mem- bers. Different areas where we can use these applications are:
Any educational institutes can make use of it for providing information about author,
content of the available books.
Thesystemwouldprovidebasicsetoffeaturestoadd/updatemembers,add/updatebo
oks,andmanage check in specifications for the systems based on the client's statement
ofneed.
3
2. LITERATURE SURVEY
JavaisaprogramminglanguageandcomputingplatformfirstreleasedbySunMicro systemsin1995.
TherearelotsofapplicationsandwebsitesthatwillnotworkunlessyouhaveJavainsta
ofapplicationsandwebsitesthatwillnotworkunlessyouhaveJavainsta lled,andmore
are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game
consoles to scientific supercomputers, cell phones to the Internet, Java iseverywhere!
Java is a programming language and a platform Independed.
Java is a high level, robust, object
object-oriented
oriented and secure programming language. Platform: Any
hardware or software environment in which a program runs, is known as a platform. Since
Java has a runtime
ime environment (JRE) and API, it is called a platform. Oops concept (object-
(object
oriented programming system):
Object means a real-world
world entity such as a pen, chair, table, computer, watch, etc. Object-
Oriented
Programmingisamethodologyorparadigmtodesign
Programmingisamethodologyorparadigmtodesignaprogramusingclassesandobj
aprogramusingclassesandobj
ects.Itsimplifies the software development and maintenance by providing someconcepts:
Object
Class
Inheritance
Polymorphism
Abstraction
Encapsulation
Fig. 2(i) 3
4
Object
Fig. 2(ii)
2.1.1 Object:
Any entity that has state and behavioris known as an object.For example a
chairpen,table,keyboard,
yboard, bike, etc. It can be physical orlogical.
An Object can be defined as an instance of a class. An object contains an address and takes up
some space in memory. Objects can communicate without knowing the details of each other's
data or code. The onlyy necessary thing is the type of message accepted and the type of response
returned by the objects.
Example: A dog is an object because it has states like color, name, breed, etc.
as well as behaviors like wagging the tail, barking, eating, etc.
2.1.2 Class:
1.2.3 Inheritance:
When one object acquire sall the properties and behavior so faparent object,it is
known as inheritance. It provides code reusability. It is used to
achieve
Runtime polymorphism.
Fig.2(iii)
1.2.4 Polymorphism:
If one task is performed by different ways ,it is known as polymorphism. For example: to
convince the customer differently, to draw something, for example, shape, triangle, rectangle,etc.
In Java, we use method overloading and method overriding to achieve polymorphism.
Another example can be to speak something; for example, a cat speaks meow, dog barks woof,
etc. Abstraction:
Hiding internal details and showing functionality is known as abstraction. For example phone
call, we don't know the internal processing. In Java, we use abstract class and interface to
achieve abstraction.
6
2.1.6 Encapsulation:
Binding (or wrapping) code and data together into a single unit are known as encapsulation
encapsulation. For ex-
ample capsule, it is wrapped with different medicines.
A java class is the example of encapsulation. Java bean is the fully encapsulated class because all
the data members are private here.
Fig .2(iv)
1.3 MariaDB:
MariaDB is developed by original developers of MySQL after concerns raised by Oracle's acquisition
of MySQL.
MariaDB is a relational database management system. It stores data in various tables. Primary keys
and foreign keys are used to establish relationship between these tables.
RDBMS facilitates you to implement a data source with tables, columns, andindices.
It is used to interpret SQL queries and operations in manipulating or sourcing data fromtable
3.SYSTEMSANALYSIS
3.1 INTRODUCTION :
Introduces the systems development life cycle (SDLC), the fundamental fourphase model
(planning, analysis, design, and implementation) common to all information systems development
8
projects. It describes the evolution of system development methodologies and discusses the roles
and skills re- quired of a systems analyst. The chapter then overviews the basic characteristics of
objectoriented systems and the fundamentals of object-oriented systems analysis and design and
closes with a de- scription of the Unified Process and its extensions and the Unified Modelling
Language.
3.1.1 OBJECTIVES:
Understand the fundamental systems development life cycle and its four
Phases.
Be familiar with the different roles played by and the skills of a systems
Analyst.
Be familiar with the Unified Process, its extensions, and the Unified
ModelingLanguage.
1. BusinessAnalyst
2. SystemsAnalyst
3. InfrastructureAnalyst 4. Change Management...
9
A feasibility study is an analysis used in measuring the ability and likelihood to complete a project
successfully including all relevant factors. It must account for factors that affect it such as economic,
technological, legal and scheduling factors. Project managers use feasibility studies to determine po- tential
positive and negative outcomes of a project before investing a considerable amount of time and money into
its BREAKING DOWN Feasibility Study.
For example, a small school looking to expand its campus might perform a feasibility study to deter- mine if
it should follow through,considering material and laborcosts,how disruptive the project would be to the
students, the public opinion of the expansion, and laws that might affect the expansion.
A feasibility study tests the viability of an idea, a project or even a new business. The goal of a feasibility
study is to emphasize potential problems that could occur if one pursues a project and determine if, after
considering all significant factors, the project is a good idea. Feasibility studies also allow a business to
address where and how it will operate, potential obstacles, competition and the funding needed to get the
business up and running.
Feasibility studies allow companies to determine and organize all the detail stomake a business work. A
feasibility study helps identify logistical problems, and nearly all business-related problems and their
solutions. Feasibility studies can also lead to the development of marketing strategies that convince
investors or a bank that investing in the business is a wisechoice.
Description: A layout of the business, the products and services it will offer, and how it will
deliver them. Market feasibility : Description of the industry, the current and future market
potential, competition, sales estimations and prospective buyers.
Technical feasibility:
The details on how a company will deliver goods or services, including trans- portation, business
location, technology needed, materials and labor.
10
Financial feasibility: A projection of the amount of funding or startup capital needed, what
sources of capital a business can and will use, and what is the return on investment.
Organizational feasibility:
A definition of the corporate and legal structure of the business. This may include information
about the founders,the irprofessional background and the skill they possess necessary to get the
company off the ground and keep itoperational.
SystemStudy:
What is system study?
Systems Analysis (according to the Waterfall model) would constitute the following steps:
The development of a feasibility study, involving determining whether a project is economi- cally,
socially, technologically and organizationallyfeasible.
Conducting fact-finding measures, designed to ascertain the requirements of the system's end- users.
These typically span interviews, questionnaires, or visual observations of work on the
existingsystem.
This exercise helps our consultants understand the limitations in the existing System and analyze the
process gaps the knowledge of which can be used to design the new system, including the develop-
ment of System Requirements Specifications (SRS) which provide a basis for the development of
the Application.
Preliminary system study is the first stage of system development life cycle. This is a brief
investiga- tion of the system under consideration and gives a clear picture of what actually the
11
physical system is? In practice, the initial system study involves the preparation of a System
proposal which lists the Problem Definition ,Objective so fthe Study,andTerm so freference for
Study,Constraints,Expected benefits of the new system, etc. in the light of the user requirements.
The system proposal is prepared by the System Analyst (who studies the system) and places it
before the user management. The man- agement may accept the proposal and the cycle proceeds to
the next stage. The management mayalso reject the proposal or request some modifications in the
proposal. In summary, we would say that system study phase passes through the followingsteps:
3.3 ExitingSystem:
This activity relies on knowledge of the hardware, software, workload, and monitoring
tools associ- ated with the system under study. It also requires access to
information recorded by accounting and software monitors during system operation. Here, we
describe general approaches applicable to a va- riety of systems. In Chapter 17, we illustrate
these approaches with an example based on a specific system (IBM’s MVS) and a specific
monitoring tool (RMF).
In Chapter 4 we divided the inputs of queuing network models into three groups: the
customer description, the center description, and the service demands.The structure of the present
chapter reflects this division. Section 12.3 is devoted to the customer description: the
correspondence of theworkload components of the system to the customer classes of the model. In
specifying the values of the cus- tomer description parameters, we are answering questions such as:
- How many customer classes are
required? - Of what type (transaction, batch, or terminal) should each class be? - What should be the
workload intensity value (A, N, or N and Z) for each class? Section 12.4 is devoted to the center
description: the correspondence of the resources of the system to the service centers of the model.
In specifying the values of the center description parameters ,we are answering questions such as:-
What devices and subsystems should be included in the model? - How should each of these
entities be rep- resented (e.g., as a queuing center, a delay center, or an FESC)? Section 12.5 is
devoted to the service demands:the description of what proportion of the measure dus age of each
device should be attributed to the customers of eachclass?
an existing system unless this model to project performance for an evolving system (the subject of
Chapter 13). Our (somewhat model is to be used for performance projection. Consequently, we
cannot completely sep- arate the task of constructing a baseline model of an existing system (the
subject of this chapter) from the task of using artificial) separation between the two tasks will be the
following: problems thatarise from limitations or shortcomings of current monitoring tools and
techniques will be treated in this chapter, while problems that would persist even with ideal
monitoring capabilities will be deferred to the nextchart.
14
• ProposedSystems
Introduction the preceding two chapter shave discussed the parameterization of queuing network
mod- elso fexisting system sand evolving systems. In this chapter we consider model so proposed
systems: major new systems and subsystems that are under going design and implementation. The
process of design and implementation involves continual tradeoffs between cost and performance.
Quantifying the performance implications of various alternative siscentral to this process .It also is
extremely chal- lenging .In the case of existing systems ,measurement data is available .In the case
of evolving systems, contemplated modifications often are straightforward (e.g., a new CPU within
a product line), and limited experimentation may be possible in validating a baseline model. In the
case of proposed sys- tems, these advantages do not exist. For this reason, it is tempting to rely on
seat-of-the-pants perfor- mance projections, which all too often prove to be significantly inerror.
The consequences can be serious, for performance, like reliability, is best designed in, rather than
added on. Recently, progress has been made in evolving a general framework for projecting the
per- formance of proposed systems. There has been a confluence of ideas from software
engineering and performance evaluation ,with queuing network model splaying a central role.The
purpose of this chapter is to present the elements of this framework. In Section 14.2 we review
some early efforts. In Section 14.3 we discuss, in a general setting, some of the components
necessary to achieve a good understanding of the performance of a proposed system. In Section
14.4 we describe two specific approaches.
3.1.2 Background:
Background User satisfaction with a new application system depends to a significant extent on
the system’s ability to deliver performance that is acceptable and consistent. In this section we
describe several early attempts at assessing the performance of large systems during the design stage.
Some common themes will bee vident ;the se will be discussed in then extsection .In the
mid1960sGECOS III was being designed by General Electric as an integrated batch and timesharing
15
system. After the initial design was complete,two activities be ganin parallel:one team began the
implementation,while another developed a simulation model to project the effects of subsequent
design and implementation decisions.
4. System RequirementSpecification
4.1 HardwareRequirement:
5. SYSTEM DESIGN
5.1 Data FlowDiagram:
Data flow oriented techniques advocate that the major data items handled by a system must be first
identifiedandthentheprocessingrequiredonthesedataitemtoproducethedesiredoutputsshouldbe
determined. The DFD (also called as bubble chart) is a simple graphical formalism that can be used
to represent a system in terms of input data to the system in terms of input data to the system,
various processing carried out on these data , and the output generated by the system . it was
introduced by de-Macro(1978). The primitive symbols used for constructing DFD’are:
Fig.5(i)
17
Success-
Add Book
ful
Librarian Login
View
Book
Issue
Fasl Book
e Data
Return
Book
Logout
Fig .5(ii)
5.2 E-R DIAGRAM
18 Add Member
Pass-
Add Book
ID Borrow
True
Login
Return Book
All Member
All Book
False
Lend History
Fig.5(iii)
19
6. SNAPSHOTS
6.2 Homepage
20
6.3 AddMember
6.4 AddBook
21
6.4 BorrowBook
6.5 ReturnBook
22
6.7 LendHistory
24
7 .DATABASEDESIGN
A database is an organized mechanism that has the capability of storing information through which a
user can retrieve stored information in an effective and efficient manner .The data is the purpose of any
database and must be protected.
The database is design is a two level process. In the first step, user requirements are gatheredtogether
andadatabaseisdesignedwhichwillmeettheserequirementsasclearlyaspossible.T hisstepiscalled
Information level Design and it is taken independent of any individual Database ManagementSystem
(DBMS).
In the Second Step, this Information level design is transferred into a design for the specific DBMS that
will be used to implement the system in question.
This step is called Physical Level Design, con-
cernedwiththecharacteristicsDBMSthatwillbeused.Adatabasedesignrunsparalle
lwiththesystem design. The organization of the data in the database is aimed to achieve the following
two major ob- jectives.
AddMember
25
7. Impelimentation
8.1 SourceCode
(Login)
package Interface;
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() {
.addComponent(jLabel1)
.addComponent(jLabel2))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.Gro
upLayout.Align- ment.LEADING, false)
.addComponent(txtuname,
javax.swing.GroupLayout.PREFERRED_SIZE, 231, ja-
vax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacemen
t.RELATED, ja- vax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jButton2))
.addComponent(txtpword,
javax.swing.GroupLayout.PREFERRED_SIZE, 231, ja-
vax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNREL
ATED)
.addGroup( jPanel1Layout.createParallelGroup(javax.swing.Gro
upLayout.Align- ment.LEADING)
.addComponent(jLabel3)
.addComponent(jLabel4))
.addContainerGap(38, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Align ment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(57, 57, 57)
addGroup(jPanel1Layout.createParallelGroup( javax.swing.GroupLayo
ut.Alignment.LEADING).addComponent(jLabel3,javax.swing.GroupL ayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout
Align- ment.BASELINE).addComponent(jLabel1).addComponent(txtuname,
javax.swing.GroupLayout.PREFERRED_SIZE, 35, ja-
vax.swing.GroupLayout.PREFERRED_SIZE))).addGap(35, 35, 35)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.G
roupLayout.Align- ment.LEADING).addComponent(jLabel4,
javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout. Align-
ment.BASELINE).addComponent(txtpword, javax.swing.GroupLayout.PREFERRED_SIZE, 35, ja-
vax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel2)))
addGap(33, 33, 33)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayo ut.Align-
ment.BASELINE).addComponent(jButton1)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE,
41, ja- vax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(32, Short.MAX_VALUE))); javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.L EADING).addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE, ja-
29
vax.swing.GroupLayout.DEFAULT_SIZE,Short.MAX_VALUE)) ; layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.L
EADING).addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE, ja-
vax.swing.GroupLayout.DEFAULT_SIZE,Short.MAX_VALUE));
setLocation
Rel
ativeTo(null
);
}//</editor-fold>
private void
jButton2ActionPerformed(java.awt.event.ActionEve nt evt) { System.exit(0);
}
private void
jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String uname=txtuname.getText(); String pword=txtpword.getText();
if(uname.equals("admin")&&pword.equals(
"1234"))
{
Home ho=new Home(); ho.setVisible(t rue);
this.dispose();
} else {
JOptionPane.showMessageDialog(rootPane, "User name or password incorrect");
}
}
/**
* @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 andfeel. * For details
seehttp://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
{ for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.get- InstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClass Name()); break;}}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging. Level.SE-VERE, null,
ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging. Level.SE-VERE, null,
ex);
30
package Interface;
30
30
jToolBar2.setRollover(true);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE
}
});
jPanel1.add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 720,
270, 50));
top);
2
)
)
; j vax.swing.BorderFactory.createLineBorder(new
L java.awt.Color(0, 0, 0),
a
b jPanel1.add(jLabel1, new e
l org.netbeans.lib.awtextra.AbsoluteConstraints(0, 40, 1550,
1
. 50)); javax.swing.GroupLayout homeDesktopLayout = new s
e javax.swing.GroupLayout(homeDesk- t
B homeDesktop.setLayout(homeDesktopLayout); o
homeDesktopLayout.setHorizontalGroup( r
homeDesktopLayout.createParallelGroup(javax.swing.Group d
Layout.Alignment.LEADING)
e .addGap(0, 0, Short.MAX_VALUE) r ( j
a
);
homeDesktopLayout.setVerticalGroup(
homeDesktopLayout.createParallelGroup
(javax.swing.GroupLayout.Alignme nt.LEADING)
.addGap(0, 0, Short.MAX_VALUE) jPanel1.add(homeDesktop, new
org.netbeans.lib.awtextra.AbsoluteConstraints(300, 100, 1250,
720));
jLabel2.setBorder(javax.swing.BorderFactory.createLineBorder(new
java.awt.Color(0, 0, 0),2));
jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 40,
1560,790));
32
jLabel3.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) jPanel1.add(jLabel3, new
;
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 90, 290,
730)); jToolBar1.setRollover(true);
jToolBar1.setPreferredSize(new java.awt.Dimension(1200,
40));
}
34
/**
* @param args the command linearguments
*/ 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 andfeel. * For details
seehttp://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html *
/ t
r
y
package Interface;
(Borrow)
package Interface;
/**
37
*
* @author dheeru
*/
public class Borrow extends javax.swing.JInternalFrame {
/**
* Creates new form Borrow
*/
Connection conn=null; PreparedStatement pst=null; ResultSet rs=null;
/**
* This method is called from within the constructor to initialize theform. * WARNING:
Do NOT modify this code. The content of this method isalways * regenerated by the FormEditor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents()
{
setClosable(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
getContentPane().add(jLabel9, new
org.netbeans.lib.awtextra.AbsoluteConstraints(30, 210, 150, -1));
jLabel3.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel3, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, 410,
240));
jLabel5.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel5, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(850, 20, 280,
330));
jLabel6.setBorder(javax.swing.BorderFactory.createLineBord
2 er(new java.awt.Color(0, 0, 0),
) getContentPane().add(jLabel6, new
) org.netbeans.lib.awtextra.AbsoluteConstraints(20, 270, 820,
;
8
0
)
)
;
41
jLabel2.setBorder(javax.swing.BorderFactory.createLine
2 Borde r(new java.awt.Color(0, 0, 0),
) getContentPane().add(jLabel2, new
)
org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10,
;
1130,660)) ;
jLabel1.setBorder(javax.swing.BorderFactory.createLine
2 Bord( new java.awt.Color(0, 0, 0),
) getContentPane().add(jLabel1, new
) org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0,
1150,
680));; jList1.setModel(newjavax.swing.AbstractListModel<String>() { String[] strings =
{ "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; public int getSize() { return strings.length; }
public String getElementAt(int i) { return strings[i]; }
});
jScrollPane2.setViewportView(jList1);
getContentPane().add(jScrollPane2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(990, 390, -1, -1));
} else {
txtmname.setText(""); txtmtype.setText(""); }
}
catch(Exception e)
{
JOptionPane.showMessageDialog(rootPane, e);
}
42
}
catch(Exception e)
{
JOptionPane.showMessageDialog(rootPane, e);
}}
private void tablelord()
{ try
{
String sql="SELECT `record_no`, `mid`, `bid`, `i_date`, `r_date` FROM
`booklend` "; pst=(com.mysql.jdbc.PreparedStatement) conn.prepareStatement(sql);
rs=pst.executeQuery();
tbllend.setModel(net.proteanit.sql.DbUtils.resultSetToTableModel(rs));
}
catch(Exception e)
{
JOptionPane.showConfirmDialog(rootPane,e);
}}
private void cleanFild()
{ txtmid.setText(""); txtmname.setText(""); txtbid.setText(""); txtbname.setText("");
txtmtype.setText(""); txtbtype.setText("");
}
private void update()
{try{
String sql="UPDATE `addbook` SET `mark`='1' WHERE bid='"+txtbid.getText()+"'";
pst=(PreparedStatement)conn.prepareStatement(sql); pst.execute();
JOptionPane.showMessageDialog(rootPane, "Update Success"); tablelord();
}
catch(Exception e)
{
JOptionPane.showMessageDialog(rootPane, e); }
43
try{
"
; pst=(com.mysql.jdbc.PreparedStatement)
conn.prepareStatement(sql); rs=pst.executeQuery(); if(rs.next())
{
String rnno=rs.getString("record_no"); int co=rnno.length(); String txt=rnno.substring(0,2);
String num=rnno.substring(2,co); int n=Integer.parseInt(num); n++;
String Snum=Integer.toString(n); String ftxt=txt+Snum; txtrno .setText(ftxt);
else {
txtrno.setText("RN1000");
}}
catch(Exception e)
{
JOptionPane.showMessageDialog(rootPane, e);
}
}
(Add Member)
package Interface;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableModel;
/**
*
* @author dheeru
*/
public class AddMembers extends javax.swing.JInternalFrame/**
* Creates new form AddMembers
*/
Connection conn=null; PreparedStatement pst=null; ResultSet rs=null; public AddMembers() {
initComponents(); conn=DBConnect.connect(); autoId(); tablelord();
} /**
* This method is called from within the constructor to initialize theform. * WARNING:
Do NOT modify this code. The content of this method isalways * regenerated by the FormEditor.
*/ @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents()
{ jLabel2 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new
javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new
javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel();
46
txtmid.addActionListener(new java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEvent evt) {
txtmidActionPerformed(evt);
}
});
getContentPane().add(txtmid, new
org.netbeans.lib.awtextra.AbsoluteConstraints(180, 100, 230, 40));
getContentPane().add(txtname, new
org.netbeans.lib.awtextra.AbsoluteConstraints(180, 150, 230, 40));
getContentPane().add(txtnic, new
org.netbeans.lib.awtextra.AbsoluteConstraints(180, 200, 230,
40));
cmbgender.setModel(new
javax.swing.DefaultComboBoxModel<>(new
String[] { "Selecte Gender", "Male", "Female", "Other" }));
cmbgender.addActionListener(new java.awt.event.ActionListener() {
public
void actionPerformed(java.awt.event.ActionEvent evt) {
cmbgenderActionPerformed(evt);
}
});
getContentPane().add(cmbgender, new
org.netbeans.lib.awtextra.AbsoluteConstraints(180, 310, 230, 40));
49
cmbmemtype.setModel(new
javax.swing.DefaultComboBoxModel<>(new String[] { "Select
Member
Type", "Student", "Teacher" }));
getContentPane().add(cmbmemtype, new
org.netbeans.lib.awtextra.AbsoluteConstraints(580, 300, 250, 40));
txtaddress.setColumns(20); txtaddress.setRows(5);
jScrollPane1.setViewportView(txtaddress);
getContentPane().add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(580, 90, 250, 60));
}
});
getContentPane().add(btnupdate, new
org.netbeans.lib.awtextra.AbsoluteConstraints(860, 190, 250, 60));
jLabel14.setBorder(javax.swing.BorderFactory.createLineBord
2 er(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel14, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(850, 90,
270, 260)); getContentPane().add(datebath, new
org.netbeans.lib.awtextra.AbsoluteConstraints(180, 260, 230, 40));
jLabel4.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel4, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(30, 80, 1100,
280));
tbldetails.setBorder(javax.swing.BorderFactory.createLineBorder(ne
w java.awt.Color(0, 0, 0))); tbldetails.setFont(new java.awt.Font("Times
New
Roman", 0, 14)); // NOI18N tbldetails.setModel(new
javax.swing.table.DefaultTableModel(
new Object [][] {}, new String [] {}));
tbldetails.addMouseListener(new java.awt.event.MouseAdapter() {
public void
mouseClicked(java.awt.event.MouseEvent evt) {
tbldetailsMouseClicked(evt);}});
jScrollPane2.setViewportView(tbldetails);getContentPane().add(jSc
rollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 370,
1100, 280));
jLabel3.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel3, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, 1120,
590));
jLabel1.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel1, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(5, 0, 1150,
670));
pack();
}// </editor-fold>
mid=txtmid.getText();
String name=txtname.getText(); String nic=txtnic.getText();
String birthday=
((JTextField)datebath.getDateEditor().getUiComponent()).getText(); String
gender=cmbgender.getSelectedItem().toString();
String address=txtaddress.getText(); String email=txtemail.getText(); String
contac=txtcontac.getText();
String type=cmbmemtype.getSelectedItem().toString();
try{
String sql="INSERT INTO `addmember`(`mid`, `name`, `nic`,
`birthday`, `gender`, `ad- dress`, `email`, `contac`, `type`)
VALUES('"+mid+"','"+name+"','"+nic+"','"+birthday+"','"+gen-
der+"','"+address+"','"+email+"','"+contac+"','"+type+"')";
PreparedStatement pst=(PreparedStatement)conn.prepareStatement(sql);
pst.execute();
JOptionPane.showMessageDialog(rootPane, "successfully insert");
}
catch(Exception e) {
tablelord();
try
{
String sql=("UPDATE `addmember` SET
`name`='"+name+"',`nic`='"+nic+"',`birth-
day`='"+birthday+"',`gender`='"+gender+"',`address`='"+address+"',`email`='"
+email+"',`con- tac`='"+contac+"',`type`='"+type+"' WHERE
mid='"+txtmid.getText()+"'");
pst=(PreparedStatement) conn.prepareStatement(sql); pst.execute();
}
53
if(rs.next())
{
String rnno=rs.getString("mid"); int co=rnno.length();
54
} else {
txtmid.setText("MI1000");
}}
catch(Exception e)
{
JOptionPane.showMessageDialog(rootPane, e);
}}
private void cleanFild()
{ txtmid.setText(""); txtname.setText(""); txtnic.setText("");
((JTextField)datebath.getDateEditor().getUiComponent()).setText("");
cmbgender.setSelectedIndex(0);
txtaddress.setText(""); txtemail.setText(""); txtcontac.setText("");
cmbmemtype.setSelectedIndex(0); }
(Add Book)
package Interface;
/**
*
* @author dheeru
*/
55
/**
* Creates new form AddBook
*/
Connection conn=null; PreparedStatement pst=null; ResultSet rs=null;
/**
* This method is called from within the constructor to initialize theform. *
WARNING: Do NOT modify this code. The content of this method isalways *
regenerated by the FormEditor.
*/ @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code"> private void
initComponents() {
4
0
)
)
;
cmbcategory.setModel(new
javax.swing.DefaultComboBoxModel<>(new String[] { "Category Type",
"Language", "Technology", "Histry", "Other" })); getContentPane().add(cmbcategory, new
org.netbeans.lib.awtextra.AbsoluteConstraints(540, 60, 250, 40));
cmbbooktype.setModel(new
javax.swing.DefaultComboBoxModel<>(new String[] { "Book type",
"Borrow", "Read Only" })); getContentPane().add(cmbbooktype, new
59
}
}
)
;
2 jLabel11.setBorder(javax.swing.BorderFactory.createLineBorder(new
) java.awt.Color(0, 0, 0),getContentPane().add(jLabel11, new
) org.netbeans.lib.awtextra.AbsoluteConstraints(820, 60,
290, 250));
new String [] {
} ));
booktable.setAlignmentX(1.0F); booktable.setAlignmentY(1.0F);
booktable.setRowHeight(25);
booktable.addMouseListener(new java.awt.event.MouseAdapter() { public void
mouseClicked(java.awt.event.MouseEvent evt) { booktableMouseClicked(evt);
}
}); jScrollPane1.setViewportView(booktable);
getContentPane().add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(12, 331, 1110, 320));
jLabel12.setBorder(javax.swing.BorderFactory.createLineBord
2 er(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel12, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1140,
660));
pack();
}// </editor-fold>
try{
String sql="INSERT INTO `addbook`(`bid`, `name`, `b_code`, `date`,
`category`,
`book_type`, `publisher`, `price`, `mark`) VAL-
61
UES('"+bid+"','"+name+"','"+b_code+"','"+date+"','"+category+"','"+booktype
+"','"+pub- lisher+"','"+price+"','0')";
PreparedStatement pst=(PreparedStatement)conn.prepareStatement(sql); pst.execute();
JOptionPane.showMessageDialog(rootPane, "successfully insert");
}
catch(Exception e) {
} else {
txtbid.setText("BI1000");
}}
62
catch(Exception e)
{
JOptionPane.showMessageDialog(rootPane, e);
}}
private void cleanFild()
{ txtbid.setText(""); txtname.setText(""); txtbcode.setText("");
((JTextField)datebath.getDateEditor().getUiComponent()).setText("");
cmbcategory.setSelectedIndex(0); txtpublisher.setText(""); txtprice.setText("");
cmbbooktype.setSelectedIndex(0);
} private void btnupdateActionPerformed(java.awt.event.ActionEvent evt) {
String bid=txtbid.getText();
String name=txtname.getText(); String b_code=txtbcode.getText();
String date=
((JTextField)datebath.getDateEditor().getUiComponent()).getText(); String
category=cmbcategory.getSelectedItem().toString();
String publisher=txtpublisher.getText(); String price=txtprice.getText();
String booktype=cmbbooktype.getSelectedItem().toString();
try
{
String sql=("UPDATE `addbook` SET
`name`='"+name+"',`b_code`='"+b_code+"',`date`='"+date+"',`category`='"+ca te-
gory+"',`book_type`='"+booktype+"',`publisher`='"+publisher+"',`price`='"+pr ice+"'
WHERE bid='"+txtbid.getText()+"'");
pst=(PreparedStatement) conn.prepareStatement(sql); pst.execute();
(Return Book)
package Interface;
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.PreparedStatement; import
java.awt.HeadlessException; import java.awt.print.PrinterException;
importjava.sql.ResultSet;
import java.sql.SQLException; import java.time.LocalDate; import
java.time.temporal.ChronoUnit; import java.util.logging.Level; import java.util.logging.Logger;
import javax.swing.JOptionPane;
/**
*
* @author asus
*/
public class Return extends javax.swing.JInternalFrame {
/**
* Creates new form Return
*/
Connection conn=null; PreparedStatement pst=null; ResultSet rs=null; public Return() {
initComponents(); conn=DBConnect.connect(); }
/**
65
setClosable(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
65
7
0
)
)
;
-
1
)
)
66
txtlateday.addActionListener(new java.awt.event.ActionListener() {
67
jLabel4.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel4, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(20, 120, 420,
400));
txtbill.setColumns(20);
txtbill.setFont(new java.awt.Font("Monospaced", 0, 24)); // NOI18N
txtbill.setRows(5);
jScrollPane1.setViewportView(txtbill);
getContentPane().add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(770, 120, 310, 390));
jLabel2.setBorder(javax.swing.BorderFactory.createLineBorder(new
java.awt.Color(0, 0, 0), 2));
getContentPane().add(jLabel2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1100,
650));
68
pack();
}// </editor-fold>
pst.execute(); update();
}
catch(Exception e) {
JOptionPane.showMessageDialog(rootPane, e);
}
}
}
catch(Exception e) {
JOptionPane.showMessageDialog(rootPane, e);
}}
private void clean()
{ try {
String sql="DELETE FROM `booklend` WHERE
bid='"+txtbid.getText()+"'"; pst=(PreparedStatement) conn.prepareStatement(sql);
pst.execute();
//JOptionPane.showMessageDialog(rootPane, "DELETE SUCCESS");
// tablelord();
} catch (HeadlessException | SQLException e) {
JOptionPane.showMessageDialog(rootPane, e); }
(AllBook)
package Interface;
/**
*
* @author neelu
*/
public class Allbooks extends javax.swing.JInternalFrame {
/**
* Creates new form AddMembers
*/
Connection conn=null; PreparedStatement pst=null; ResultSet rs=null;
/**
* This method is called from within the constructor to initialize theform. *
WARNING: Do NOT modify this code. The content of this method isalways *
regenerated by the FormEditor.
*/ @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code"> private void
initComponents() {
setClosable(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
6
0
)
)
;
72
} ));
jScrollPane1.setViewportView(txtallbook);
getContentPane().add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(32, 80, 1080, 490));
);
2
)
j tBorder(javax.swing.BorderFactory.createLineBorder(new
L java.awt.Color(0, 0, 0),
a
b getContentPane().add(jLabel3, new
e org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, 1100, l
3
.se
590));
73
jLabel1.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel1, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(5, 0, 1130,
670));
pack();
}// </editor-fold>
rs=pst.executeQuery();
txtallbook.setModel(net.proteanit.sql.DbUtils.resultSetToTableModel(rs));
}
catch(Exception e)
{
JOptionPane.showConfirmDialog(rootPane,e);
}
}
(AllMember)
package Interface;
/**
*
* @author dheeru
*/
public class Allmember extends javax.swing.JInternalFrame {
/**
/**
* This method is called from within the constructor to initialize theform. * WARNING: Do
NOT modify this code. The content of this method isalways * regenerated by the FormEditor.
*/ @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() {
setClosable(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
6
0
)
)
;
jScrollPane1.setViewportView(tblallmember);
getContentPane().add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(32, 80, 1070, 490));
jLabel3.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel3, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, 1100,
580));
77
jLabel1.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel1, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(5, 0, 1130,
660));
pack();
}// </editor-fold>
(Lend History)
package Interface;
/**
*
* @author neelam
*/
public class LendHistry extends javax.swing.JInternalFrame {
/**
* Creates new form AddMembers
*/
Connection conn=null; PreparedStatement pst=null; ResultSet rs=null;
setClosable(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
6
0
)
)
;
},
new String [] {
} ));
jScrollPane1.setViewportView(tbllendhistry);
getContentPane().add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(32, 80, 1090, 490));
jLabel3.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel3, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, 1110,
580));
jLabel1.setBorder(javax.swing.BorderFactory.createLineBorde
2 r(new java.awt.Color(0, 0, 0),
)
) getContentPane().add(jLabel1, new
; org.netbeans.lib.awtextra.AbsoluteConstraints(5, 0, 1140,
81
660));
}
private void tablelord()
{ try {
String sql="SELECT `record_no`, `mid`, `bid`, `i_date`, `r_date` FROM `booklend`";
pst=(PreparedStatement) conn.prepareStatement(sql); rs=pst.executeQuery();
tbllendhistry.setModel(net.proteanit.sql.DbUtils.resultSetToTableModel(rs));
}
catch(Exception e)
{
JOptionPane.showMessageDialog(rootPane,e);
}
}
// Variables declaration - do not modify private javax.swing.JButton jButton1; private
javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3;
private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable tbllendhistry; private
javax.swing.JTextField txtsearch; }
82
8. SYSTEM TESTING
8.1 Testing:
It is process use to identify correctnesscompletenessand qualities of developed computer software.
OR
A good test is one that has a high probability of finding an as yet, undiscovered error.
Unit Testing
Integration Test-
System Testing
{Structure of testing}
8.1.2 UnitTesting:-
Testing of an individual software component or module is termed as Unit testing. It is typically done
by the programmer and not by testers, as it requires a detailed knowledge of the internal program
design and code. It may also require developing test drive modules or test harnesses.
8.1.2.1 IntegrationTesting
The testing of combined parts of an application to determine if they function correctly together is
Integration testing. There are two methods of doing Integration Testing Bottom-up Integration testing
and Top Down Integration testing.
a) Bottom-Up integrationtesting
b) Top-Down integrationtesting
83
Top-Downintegrationtestingthehighestlevelmodulesaretestedfirstandprogressivelylower-level
modules are tested after that. In a comprehensive software development environment, bottom-up
test- ing is usually done first, followed by top-downtesting..
8.1.2.2 SystemTesting
A level of the software testing process where a complete, integrated system/software is tested. The
purpose of this test is to evaluate the system’s compliance with the specified requirements. System
testing there are two types:-
8.1.2.2.1 AlphaTesting
8.1.2.2.2 BetaTesting
a) Alphatesting
This test is the first stage of testing and will be performed amongst the teams
(developer and QA
teams).Unittesting,integrationtestingandsystemtestingwhencombinedareknownasalphatesting.
During this phase, the following will be tested in theapplication:
• SpellingMistakes.
• BrokenLinks. CloudyDirections.
• The Application will be tested on machines with the lowest specification to test loading
times and any latencyproblems.
c) BetaTesting
This test is performed after Alpha testing has been successfully performed. In beta testing a
sampleoftheintendedaudienceteststheapplication.Betatestingisalsoknownasprerelease testing. Beta
test versions of software are ideally distributed to a wide
audience on the Web, partlytogivetheprograma"real-
world"testandpartlytoprovideapreviewofthenextrelease. In this phase the audience will be testing
thefollowing:
• Users will install, run the application and send their feedback to the projectteam.
• Typographical errors, confusing application flow, and evencrashes.
84
• Getting the feedback, the project team can fix the problems before releasing the software to
the actualusers.
• The more issues you fix that solve real user problems, the higher the quality of your ap-
plication willbe.
• Having a higher-quality application when you release to the general public will increase
customersatisfaction.
8.1.2.3 PerformanceTesting:-
Thistermisoftenusedinterchangeablywith‘stress’and‘load’testing.Performancet estingisdoneto
check whether the system meets the performance requirements. Different performance and load tools are
used to do thistesting.
1. StressTesting:
This testing is done when a system is stressed beyond its specifications in order to check how
andwhenitfails.Thisisperformedunderheavyloadlikeputtinglargenumberbeyondstorage capacity, complex
database queries, continuous input to the system or databaseload.
2. VolumeTesting:
Volume testing is a type of non-functional testing performed by the performance testing team.The
software or application undergoes a huge amount of data and Volume Testing checks the system
behavior and response time of the application when the system came across such a high volume of data.
This high volume of data may impact the system’sper- formance and speed of the processingtime.
3. CompatibilityTesting:-
It is a testing type in which it validates how software behaves and runs in a different envi-
ronment, web servers, hardware, and network environment. Compatibility testing ensures that
software can run on a different configuration, different database, different browsers, and their
versions. Compatibility testing is performed by the testing team.
85
4. SecurityTesting:-
Itisatypeoftestingperformedbyaspecialteamoftesters.Asystemcanbepenetratedby
anyhackingway.Securitytestingisdonetocheckhowthesoftwareorapplicationorweb- site is secure from
internal and external threats. This testing includes how much software is secure from the malicious
program, viruses and how secure and strong theauthorization
andauthenticationprocessesare.Italsocheckshowsoftwarebehavesforanyhackersattack and malicious
programs and how software is maintained for data security after such a hacker attack.
White box testing is based on the knowledge about the internal logic of an application’s code.
It is also known as Glass box Testing. Internal software and code working should be known for
per-
formingthistypeoftesting.Underthesetestsarebasedonthecoverageofcodestatements, branches, paths,
conditionsetc.
86
10. CONCLUSION
From a proper analysis of positive point and constraints on the component, it can be safely that the
desktop application is a highly efficient GUI based component.
This desktop application is work properly and meting all user requirements.
87
11. REFERENCE
The book taken as guidance for the completion of the project are:
WWW.ORACAL.COM
FORMARIADB
WWW.ORACAL.COM
WEB SITES
www.javatpiont.comwww.w3school.com
88
12 BIBLIOGRAPHY
Java Complete Refrence By Herbertshield
Database programming with JDBC and Java By George Reese.
Java and xml by BrettMcLaughlin
WIKIPEDIA,URL :http://www.wikipedia.org. Answers.com,online
dictionary,encyclopedia
NEELAM PAL
LUCKNOW-226017
OBJECTIVE
89
To be a part of an organization where I use my skill and knowledge to deliver value added result
and work the best of my ability to acquire success.
PROFESSIONAL QUALIFICATION
TECHNICAL SKILLS
ACADEMIC CREDENTIALS
WORK EXPERIENCE
AREA OF INTEREST
90
PERSONAL DETAILS
DECLARATION
I hereby declare that the information provided by me is true to the best of my knowledge and
belief.