Project Library
Project Library
A PROJECT ON
Submitted By : Submitted To :
Name : Name :
Date : Date :
Roll No : ………………………….
Address : ………………………….
………………………….
Phone No : ………………………….
Supervisor : ………………………….
Student Name
Introduction
Java Details
Priliminary Design
Form Layouts
Database Design
Implementation
Bibliography
Teacher Remarks
project.
There were five primary goals in the creation of the Java language:
Java tools
In order to write java application or applets ,one need more than a language . The tools that
lets one to write , test , debug programs.
Java features
● Compiler and Interpreted
● Platform independent
● Simple
● Secure
● Familiar
● Portable
● Object-Oriented
● Robust
● Multithreaded
● High performance
● Distributed
● Dynamic
Compiler and Interpreted - There is a java compiler , named javac . The java compiler
takes input source code files (these files typically have the ext.java) and converts them into
compiled bytecode files.The java Interpreter known as javac can be used to execute java
application .The interpreter translates bytecode directly into program actions.
Platform independent - Java programs can be easily moved from one computer to
another, anywhere and anytime.Changes and upgrades made in operating systems,
processors and system resources will not force any changes in java programs.
Simple - Java is designed to be easy for programmer to learn and use efficiently.
Portable- Java compiler generates bytecode instructions that can be implemented on any
machine and also the size of the primitive data types are machine independent.
Object-Oriented - Java is a true object-oriented language. All program code and data
reside within objects and classes.
Robust -It provides many safeguards to ensure reliable code. It has strict compile time and
run time checking for data types. Designed as a garbage-collected language relieving the
programmers and also incorpates the concept of exception handling which captures series
errors.
Distributed - It has ability to share both data and programs. Java applications can open
and access remote objects on internet which enables multiple programmers at multiple
remote locations to collaborate and work together on single project.
Dynamic - Java is capable of dynamically in new class libraries , methods and objects .It
supports functions written in other languages like C,C++ called as native methods.
In Java, this potential problem is avoided by automatic garbage collection. The programmer
determines when objects are created and the Java runtime is responsible for managing the
objects' lifecycle. The program or other objects can reference an object by holding a
reference to it (which, from a low-level point of view, is its address on the heap). When no
references to an object remain, the Java garbage collector automatically deletes the
LIBRARY MANAGEMENT SYSTEM | Created by : Student Name
unreachable object, freeing memory and preventing a memory leak. Memory leaks may still
occur if a programmer's code holds a reference to an object that is no longer needed—in
other words, they can still occur but at higher conceptual levels.
Comparing Java and C++, it is possible in C++ to implement similar functionality (for
example, a memory management model for specific classes can be designed in C++ to
improve speed and lower memory fragmentation considerably), with the possibly cost of
extra development time and some application complexity. In Java, garbage collection is built
in and virtually invisible to the developer. That is, developers may have no notion of when
garbage collection will take place as it may not necessarily correlate with any actions being
explicitly performed by the code they write. Depending on intended application, this can be
beneficial or disadvantageous: the programmer is freed from performing low-level tasks but
at the same time lose the option of writing lower level code.
Objects and Classes - An object is a software bundle of variables and related methods.
Objects are key to understanding object-oriented technology. Real-world objects share two
characteristics: They all have state and behavior.
Software objects are modeled after real-world objects in that they too have state and
behavior Classes can also define class variables. A class variable contains information that is
LIBRARY MANAGEMENT SYSTEM | Created by : Student Name
shared by all instances of the class .A class can also declare class methods. You can invoke a
class method directly from the class, whereas you must invoke instance methods on a
particular instance.
Inheritance - Inheritance is the process by which objects of one class acquire the property
of objects of another class. Each subclass inherits state .However, subclasses are not limited
to the states and behaviors provided to them by their superclass. Subclasses can add
variables and methods to the ones they inherit from the superclass. It supports the concept
of hierarchical classification it also provides the use of reusability. .
Polymorphism - This means the ability to take more than one form. An operation may
exhibit different behaviour in different instances. The behaviour depends upon the types of
data used in the operation. It plays an important role in allowing objects having different
internal structures to share external interface.
The Java Database Connectivity (JDBC) API is the industry standard for database-
independent connectivity between the Java programming language and a wide range of
databases – SQL databases and other tabular data sources, such as spreadsheets or flat files.
The JDBC API provides a call-level API for SQL-based database access.
JDBC technology allows you to use the Java programming language to exploit "Write Once,
Run Anywhere" capabilities for applications that require access to enterprise data. With a
JDBC technology-enabled driver, you can connect all corporate data even in a
heterogeneous environment.
Driver
Database
Database
The JDBC architecture is based on a collection of java interfaces and classes that together enable you
to connect to data sources , to create and execute SQL statements and to retrieve and modify data in
a database.
The JDBC-ODBC Bridge –“sun.jdbc.odbc.jdbcodbcDriver”-is included with JDK and it enables
Java applications to access data through drivers written to the ODBC standard. The driver bridge is
useful for accessing data in data sources for which no pure JDBC drivers exist. The bridge works by
translating the JDBC methods into ODBC function calls.
● Data Defination Language (DDL) – DDL statements are used to describe the tables
and the data they contain. The subset of SQL statements used for modeling the structure
(rather than the contents) of a database or cube. The DDL gives you the ability to create,
modify, and remove databases and database objects.
● Data Manipulation Language (DML) – DML statements that are used to operate on
data in the database. These are statements that allow you to create or alter objects (such as
tables, indexes, views, and so on) in the database. The subset of SQL statements used to
retrieve and manipulate data. DML can be further divided into 2 groups:-
SELECT - SQL statement used to request a selection, projection, join, query, and so on,
from a SQL Server database.
Primary key – Primary key constraints identify the column or set of columns whose values
uniquely identify a row in a table. No two rows in a table can have the same primary key
value. You cannot enter a NULL value for any column in a primary key.
Insert - The Insert logical operator inserts each row from its input into the object specified
in the Argument column. To insert the data into a relation we either specify a tuple to be
inserted or write a query.
Delete - The Delete logical operator deletes from an object rows that satisfy the optional
predicate in the Argument column. We can delete only whole tuples; we cannot delete
values on only particular attributes.
Update - The Update logical operator updates each row from its input in the object
specified in the Argument column. It provides a way of modifying existing data in a table.
SWING
Jframe and Component – Jframe extends the AWT class Frame. It contains additional
features that enable it to support Swing components. JComponent extends the AWT
component and Container classes. It is the top level class for all Swing components and
provides Swing pluggable look and feel.
Here are some of the Swing component classes:
CLASS DESCRIPTION
Abstract Button Abstract super class for Swing buttons.
Button Group Encapsulates a mutually exclusive set of
buttons.
Image Icon Encapsulates an icon.
JApplet The SWING version of APPLET.
JButton The SWING push button class.
JCheckBox The SWING check box class.
JComboBox Encapsulates a combo box .
JLabels The SWING version of a label.
JRadioButton The SWING version of a radio button.
JScrollPane Encapsulates a scrollable window.
JTabbedPane Encapsulates a tabbed window.
JTextField The SWING version of Text field.
JTree Encapsulates a tree based-control.
● Icons – Icons are encapsulated by the Image Icon class, which paints an icon from an
image.
● JButton – JButton class provides the functionality of a push button. JButton allows an
icon of string to be associated with the push button.
● JComboBox – It is provided through the JComboBox class. It normally displays one entry
and can also display a drop down list that allows a user to select a different entry.
● JTree - It is a component that presents a hierarchical view of data. A user has ability to
expand individual subtrees. These are implemented in Swing by JTree class.
1. It provides more powerful and more flexible components possible in AWT package.
For e.g. JButton can have both image as well as text field associated with it which is
not possible in awt package.
3. Further the Swing components can provide pluggable look and feel, which means
that it is easy to substitute another appearance and behavior for an element.
jMenu1.setText("Publisher");
jMenuBar1.setBorder(javax.swing.BorderFactory.c
reateBevelBorder(javax.swing.border.BevelBorder. mnuPub.setText("Publisher Console");
RAISED)); mnuPub.addActionListener(new
java.awt.event.ActionListener() {
jMenu2.setText("Book"); public void
actionPerformed(java.awt.event.ActionEvent evt) {
mnuLib.setText("Book Console"); mnuPubActionPerformed(evt);
mnuLib.addActionListener(new }
java.awt.event.ActionListener() { });
public void jMenu1.add(mnuPub);
actionPerformed(java.awt.event.ActionEvent evt) {
mnuLibActionPerformed(evt); mnuPMod.setText("Modification");
} mnuPMod.addActionListener(new
}); java.awt.event.ActionListener() {
jMenu2.add(mnuLib); public void
actionPerformed(java.awt.event.ActionEvent evt) {
mnuLibEdit.setText("Modification"); mnuPModActionPerformed(evt);
mnuLibEdit.addActionListener(new }
java.awt.event.ActionListener() { });
public void jMenu1.add(mnuPMod);
actionPerformed(java.awt.event.ActionEvent evt) {
mnuLibEditActionPerformed(evt); mnuPDel.setText("Deletion");
} mnuPDel.addActionListener(new
}); java.awt.event.ActionListener() {
jMenu2.add(mnuLibEdit); public void
actionPerformed(java.awt.event.ActionEvent evt) {
mnuIssue.setText("Book Issue"); mnuPDelActionPerformed(evt);
cmdExit.setText("Exit"); jLabel3.setText("Authors");
cmdExit.addActionListener(new
java.awt.event.ActionListener() { jLabel4.setText("Publisher");
public void
actionPerformed(java.awt.event.ActionEvent evt) { jLabel5.setText("Price");
cmdExitActionPerformed(evt);
} jLabel6.setText("Purchase Date");
});
jLabel7.setText("Pages");
cmdEdit.setText("Edit");
cmdEdit.addActionListener(new jLabel8.setText("Edition");
java.awt.event.ActionListener() {
public void jLabel9.setText("Status");
actionPerformed(java.awt.event.ActionEvent evt) {
cmdEditActionPerformed(evt); jComboBox1.setModel(new
} DefaultComboBoxModel() );
});
cmdDelete.setText("Delete");
} import java.sql.*;
import javax.swing.JOptionPane;
/** import javax.swing.DefaultListModel;
* @param args the command line arguments
*/ public class IssueUI extends javax.swing.JFrame {
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new /** Creates new form IssueUI */
Runnable() { public IssueUI() {
public void run() { initComponents();
new LibUI().setVisible(true); }
}
}); /** This method is called from within the
} constructor to
* initialize the form.
// Variables declaration - do not modify * WARNING: Do NOT modify this code. The
private javax.swing.JButton cmdClear; content of this method is
private javax.swing.JButton cmdDelete; * always regenerated by the Form Editor.
private javax.swing.JButton cmdEdit; */
private javax.swing.JButton cmdExit; @SuppressWarnings("unchecked")
private javax.swing.JButton cmdNew; // <editor-fold defaultstate="collapsed"
private javax.swing.JButton cmdSave; desc="Generated Code">
private javax.swing.JComboBox jComboBox1; private void initComponents() {
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10; jLabel6 = new javax.swing.JLabel();
private javax.swing.JLabel jLabel2; jScrollPane1 = new javax.swing.JScrollPane();
private javax.swing.JLabel jLabel3; jList1 = new javax.swing.JList();
private javax.swing.JLabel jLabel4; jLabel11 = new javax.swing.JLabel();
private javax.swing.JLabel jLabel5; jLabel1 = new javax.swing.JLabel();
private javax.swing.JLabel jLabel6; txtMNo = new javax.swing.JTextField();
private javax.swing.JLabel jLabel7; txtMName = new javax.swing.JTextField();
private javax.swing.JLabel jLabel8; jLabel2 = new javax.swing.JLabel();
private javax.swing.JLabel jLabel9; txtMStatus = new javax.swing.JTextField();
private javax.swing.JTextField txtAcno; jLabel5 = new javax.swing.JLabel();
private javax.swing.JTextField txtAuth1; jLabel7 = new javax.swing.JLabel();
private javax.swing.JTextField txtAuth2; txtMDate = new javax.swing.JTextField();
private javax.swing.JTextField txtBTitle; jSeparator1 = new javax.swing.JSeparator();
private javax.swing.JTextField txtEdition; jLabel3 = new javax.swing.JLabel();
private javax.swing.JTextField txtPDate; txtAcno = new javax.swing.JTextField();
private javax.swing.JTextField txtPages; jLabel4 = new javax.swing.JLabel();
private javax.swing.JTextField txtPrice; txtBTitle = new javax.swing.JTextField();
private javax.swing.JTextField txtStatus; jLabel12 = new javax.swing.JLabel();
txtPID = new javax.swing.JTextField();
jLabel6.setFont(new cmdLast.setText("Last");
java.awt.Font("VAGRounded BT", 1, 14)); cmdLast.addActionListener(new
jLabel6.setForeground(new java.awt.Color(0, java.awt.event.ActionListener() {
153, 153)); public void
actionPerformed(java.awt.event.ActionEvent evt) {
jLabel6.setHorizontalAlignment(javax.swing.Swing cmdLastActionPerformed(evt);
Constants.CENTER); }
jLabel6.setText("PUBLISHER INFORMATION"); });
/**
/** Creates new form MListUI */
* @param args the command line arguments
public MListUI() {
*/
initComponents();
public static void main(String args[]) {
}
java.awt.EventQueue.invokeLater(new
Runnable() {
/** This method is called from within the
public void run() {
constructor to
new MembUI().setVisible(true);
* initialize the form.
}
* WARNING: Do NOT modify this code. The
});
content of this method is
}
* always regenerated by the Form Editor.
*/
// Variables declaration - do not modify
@SuppressWarnings("unchecked")
private javax.swing.JButton cmdClear;
// <editor-fold defaultstate="collapsed"
private javax.swing.JButton cmdDel;
desc="Generated Code">
private javax.swing.JButton cmdEdit;
private void initComponents() {
private javax.swing.JButton cmdExit;
private javax.swing.JButton cmdNew;
jLabel1 = new javax.swing.JLabel();
private javax.swing.JButton cmdSave;
jScrollPane1 = new javax.swing.JScrollPane();
private javax.swing.JLabel jLabel1;
jTable1 = new javax.swing.JTable();
private javax.swing.JLabel jLabel2;
cmdExit = new javax.swing.JButton();
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
setDefaultCloseOperation(javax.swing.WindowCon
private javax.swing.JLabel jLabel6;
stants.EXIT_ON_CLOSE);
private javax.swing.JLabel jLabel7;
setTitle("Member List - Library Management
private javax.swing.JLabel jLabel8;
System || www.ezindagi.in ||");
private javax.swing.JLabel jLabel9;
setBounds(new java.awt.Rectangle(200, 70, 0,
private javax.swing.JSeparator jSeparator1;
0));
private javax.swing.JSeparator jSeparator2;
addWindowFocusListener(new
private javax.swing.JTextField txtMAdd;
java.awt.event.WindowFocusListener() {
private javax.swing.JTextField txtMDate;
2. Oxford 12th IP