Documente Academic
Documente Profesional
Documente Cultură
This Project Report has been prepared in partial fulfilment of the requirement for the Subject:
JAVA (after 2nd Year) in the academic year 2010-2011.For preparing the Project Report, I joined
6 weeks industrial training at Oops Info Solution Pvt. Ltd., Chandigarh and did my project which
comes under Oops Info Solution Pvt. Ltd during the suggested duration for the period of 6
weeks, to avail the necessary information. The blend of learning and knowledge acquired during
our practical studies at the company is presented in this Project Report .The rationale behind
visiting the company and preparing the Project Report is to study the concepts of Java ,mainly
this project report gives the information about Core Java.
The Project Report starts with the brief introduction of the project alongwith the whole process
involved in developing this project.
DECLARATION
I hereby declare that the project work entitled Library Management System is an authentic
record of my own work with my team carried out at Oops Info Solution Pvt. Ltd., Chandigarh as
requirements of six weeks project term for the award of degree of B.Tech. (Computer
Engineering), National Institute of Technology, Kurukshetra, under the guidance of Mr. Amit
Chopra, Instructor, Oops Info Solution Pvt. Ltd.,Chandigarh, during 12 June to 27th July, 2011).
ACKNOWLEDGEMENTS
The project work in this report is an outcome of continuous work over a period and drew
intellectual support from various sources. Obligations thus incurred in completing this report. It is
therefore almost impossible to express adequately the debts to many persons who have been
instrumental in imparting this work a successful status.
I would like to express my gratitude to Mr. Manish Bhatia (Instructor, SQL Technologies and
Core Java) for extending full support and co-operation and their invaluable guidance and
frequent suggestions during the training period. Their suggestions helped me maintain a good
quality of work. I express my deep gratitude to them.
Finally, I thank my friends for their constant support and encouragement. Their unobtrusive
support and suggestions bolstered my confidence as usual. Their inspiring words will always be
a guiding force in all my endeavors to attain greater heights.
TABLE OF CONTENTS
1. Abstract..1
1.1 Purpose....1
1.2 Scope...1
1.3 Technologies Used..1
1.4 Project Functionalities.1
1.5 Project Assumptions....2
3. Project Details....16
3.1 Front End.16
3.2 Back End..37
4. Design Phase...41
4.1 ER Diagram.....41
4.2 DFD Diagram..42
7. Results..59
8. Conclusions..59
9. Future Scope of work.59
10. References..60
1. Abstract
1.1 Purpose:
The purpose of this application are as follows:
library.
We can issue the books to the students and maintain their records and can also check how
1.2 Scope:
The different areas where we can use this application are:
Any educational institute can make use of it for providing information about author, content
Admin:
Can search, create and delete the record of membership as per requirements.
Can add, delete, issue, search information regarding any book
Can create new book categories
Can create new member categories
Can create new clerks
Can collect fines from members
Clerk:
Member:
Can search any book
Can search records of any member
Platform independent
Java is a platform for application development. A platform is a loosely defined computer industry
buzzword that typically means some combination of hardware and system software that will
mostly run all the same software.
Java byte code is exactly the same on every platform. Java programs that have been compiled
into byte code still need an interpreter to execute them on any given platform. The interpreter
reads the byte code and translates it into the native language of the host machine on the fly.
Since the byte code is completely platform independent, only the interpreter and a few native
libraries need to be ported to get Java to run on a new computer or operating system.
All these pieces, the javac compiler, the java interpreter, the Java programming language, and
more are collectively referred to as Java.
Object oriented
In object-oriented programs data is represented by objects. Objects have two sections, fields
(instance variables) and methods. Fields tell you what an object is. Methods tell you what an
object does. These fields and methods are closely tied to the object's real world characteristics
and behavior. When a program is run messages are passed back and forth between objects.
When an object receives a message it responds accordingly as defined by its methods.
Robust
Java implements a robust exception handling mechanism to deal with both expected and
unexpected errors. The worst that an applet can do to a host system is bringing down the
runtime environment. It cannot bring down the entire system.
Most importantly Java applets can be executed in an environment that prohibits them from
introducing viruses, deleting or modifying files, or otherwise destroying data and crashing the
host computer. A Java enabled web browser checks the byte codes of an applet to verify that it
doesn't do anything nasty before it will run the applet.
Multithreaded
Java is inherently multi-threaded. A single Java program can have many different threads
executing independently and continuously. Three Java applets on the same page can run
together with each getting equal time from the CPU with very little extra effort on the part of the
programmer.
High performance
Java byte codes can be compiled on the fly to code that rivals C++ in speed using a "just-in-time
compiler." Several companies are also working on native-machine-architecture compilers for
Java. These will produce executable code that does not require a separate interpreter, and that
is indistinguishable in speed from C++.
Dynamic
Java programs carry with them substantial amounts of run-time type information that is used to
verify and resolve accesses to objects at run-time. This makes it possible to dynamically link
code in a safe and expedient manner. The java programming language is unusual than other
programming languages it first compiles and then interprets the program. Compile first translate
the program into intermediate language called intermediate language called java byte code.
Java byte code is platform independent code, which is further interpreted by the interpreter on
the java platform. Interpreter parses and run each java byte code instruction on the computer.
Compilation occurs only once, interpretation occurs each time when the program is executed.
Java byte code helps in making the program write once, run anywhere. The program can be
compiled into byte code by any platform that is having the java compiler; the compiled java byte
code program is ready to run on any machine having the java virtual machine (JVM).
JVM is
Real-time video
learned from the mistakes of its predecessors. It is considerably cleaner and easier to use than
those languages.
Simple
Java has the bare bones functionality needed to implement its rich feature set. It does not add
lots of syntactic sugar or unnecessary features.
Object-Oriented
Almost everything in Java is either a class or a method or an object. Only the most basic
primitive operations and data types (int, for, while, etc.) are at a sub-object level.
Platform Independent
Java programs are compiled to a byte code format that can be read and run by interpreters on
many platforms including Windows 95, Windows NT, and Solaris 2.3 and later.
Safe
Java code can be executed in an environment that prohibits it from introducing viruses, deleting
or modifying files, or otherwise performing data destroying and computer crashing operations.
High Performance
Java can be compiled on the fly with a Just-In-Time compiler (JIT) to code that rivals C++ in
speed.
Multi-Threaded
Java is inherently multi-threaded. A single Java program can have many different things
processing independently and continuously.
There are other reasons to hide fields and methods of a class, as well:
Internal fields and methods that are visible outside the class just clutter up the API. Keeping
visible fields to a minimum keeps your class tidy and therefore easier to use and
understand.
If a field or method is visible to the users of your class, you have to document it. Save
yourself time and effort by hiding it instead.
Inheritance
Inheritance is the process by which one object acquires the properties of another object. This is
important because it supports the concept of hierarchical classification. Most knowledge is
made by hierarchical classification.
Inheritance is a compile-time mechanism in Java that allows you to extend a class (called the
base class or super class) with another class (called the derived class or subclass).
In Java, inheritance is used for two purposes:
Class inheritance - create a new class as an extension of another class, primarily for the
purpose of code reuse. That is, the derived class inherits the methods of the base class.
Interface inheritance - create a new class to implement the methods defined as part of an
interface for the purpose of sub typing. That is a class that implements an interface
conforms to the interface.
In Java, unlike C++, these two types of inheritance are made distinct by using different language
syntax. For class inheritance, Java uses the keyword extends and for interface inheritance Java
uses the keyword implements.
For example:
class Base {
private int x;
public int f() { ... }
protected int g() { ... } // NOTE: protected access means visible to subclass only
}
class Derived extends Base {
private int y;
public void h() { y = g(); ... }
}
In Java, unlike C++, only single class inheritance is supported. I.e., for a given class, there is
only one super class.
Polymorphism
Polymorphism is the capability of an action or method to do different things based on the object
that it is acting upon. This is the third basic principle of object oriented programming.
Two types of polymorphism:
2)
Java
Source
Code
Java
Compiler
Java
Object
Code
Java interpreter
The Java API is a large collection of ready-made software components that provide many
useful capabilities, such as graphical user interface (GUI). The java API is grouped into libraries
of related classes and interfaces these libraries are known as packages.
Programming language
Java
Java and C
Java does not include keywords like goto , sizeof and typedef.
Java does not contain data types like struct, union and enum.
Java does not define the type modifiers keywords like auto, register, signed.
General Style
In order to write a program in Java, one has to follow the well-defined structure of the Java
program and should have the basic idea of all the programming constructs like statements,
tokens, etc.
All database tables, queries, forms, reports, macros, and modules are stored in the Access Jet
database as a single file.
For query development, Access offers a Query Designer, a graphical user interface that allows
users to create queries without knowledge of the SQL programming language. In the Query
Designer, users can "show" the datasources of the query (which can be tables or queries) and
select the fields they want returned by clicking and dragging them into the grid. Joins can be
created by clicking and dragging fields in tables to fields in other tables. Access allows users to
view and manipulate the SQL code if desired. Any Access table, including linked tables from
different data sources, can be used in a query.
Access also supports the creation of Pass-Through queries. These are queries that can be
linked to external data sources through the use of ODBC connections on the local machine.
This enables users to interact with data stored outside the Access programme without using
linked Tables. The Pass-Through queries are written using the SQL syntax supported by the
external data source.
There is also the Jet Database format (MDB or ACCDB in Access 2007) which can contain the
application and data in one file. This makes it very convenient to distribute the entire application
to another user, who can run it in disconnected environments.
3. Project Details
3.1Front End:
This project can basically be viewed from the viewpoint of three users:
Admin
Clerk
Member
Student
Faculty
Research Student
Depending upon the type of members, different limits on maximum number of books issued and
the number of days for which a book can be issued are imposed.
Students can issue a maximum of 3 books and keep them for 10 days.
Faculty can issue a maximum of 5 books and keep them for 30 days.
Research Students can issue a maximum of 5 books and keep them for 45 days.
Though, these three categories are used but new categories of 'Member' can be created by the
Admin.
In this project different functionalities have been assigned/provided to the different users.
As the project is automated Library Management System, so basically all the features of Library
System have been included in the project.
Major features like Issue of book, return of book, addition of book, deletion of book, addition of
members, collection of fines from members, deletion of members, creation of new book
category, creation of new member category etc. have been included but the control to these
functionalities vary depending upon the type of user.
The project consists of following files:
AddBCat.java
AddBook.java
AddClerk.java
AddMCat.java
AddMember.java
ColFine.java
Dates.java
DeleteBook.java
DeleteMember.java
IssueBook.java
LibraryHelp.java
LibrarySystem.java
Logon.java
ReturnBook.java
SearchBook.java
SearchMember.java
TableDisp.java
All the files with major functions and the users having their authorization control are discussed in
detail below:
1: Logon.java
Login of User:
2: AddBook.java
Addition of new book:
Only Admin has authorized access to the functionality of Addition of new books.
Other users i.e Clerks and members don't have access to this functionality.
In order to add a new book, Admin has to provide various attributes of the book like:
Book Id
Book Name
Book Author
Reference (i.e whether the book is a reference book or not)
Book Category
3: AddMember.java
Addition of new member:
Only Admin has authorized access to the functionality of Addition of new members.
Other users i.e Clerks and members don't have access to this functionality.
In order to add a new member, Admin has to provide various attributes of the member like:
Member Id
Member Name
Member Password
Member Category
Date on which member is added (this will be updated automatically)
4: IssueBook.java
Issue of Book:
Admin and Clerks have authorized access to the functionality of Issue of Books.
Other users i.e members don't have access to this functionality.
Books can only be issued to the members and only Admin and Clerks can issue the books to
the members.
In order that a book be issued, Admin or Clerk needs to specify the various information
regarding book and the member which includes:
Book Id
Book Name
Book Author
Book Category (On specifying Book Id, all other details of that book will automatically be
displayed)
Member Id
Member Name (On specifying Member Id, Member name will be displayed automatically)
Issue Date (will be updated automatically)
Return Date (will be updated automatically depending on the type of Member to whom the
book is issued)
5: ReturnBook.java
Return of Book:
Only Admin and Clerk have authorized access to the functionality of Return of Books.
Other users i.e members don't have access to this functionality.
Only Members to whom the book has been issued can return the book and only Admin and
Clerk can take bake the book returned by the member.
In order that Admin or Clerk may take back the returned book, he needs to specify the following
information:
Book Id7
Book Name (On specifying Book id, Book Name will be displayed automatically)
Member Name (to whom the book was issued) (On specifying Book id, Member Name will
be displayed automatically).
6: DeleteBook.java
Delete Book:
Only Admin has authorized access to the functionality of Deletion of Books.
Other users i.e Clerks and members don't have access to this functionality.
In order to delete a book, Admin needs to specify the following information about the book:
Book Id
Book Name
Book Author (On specifying Book id, Book Name and Author Name will be displayed
automatically)
7: DeleteMember.java
Delete Member:
Only Admin has authorized access to the functionality of Deletion of Members.
Other users i.e Clerks and members don't have access to this functionality.
In order to delete a member, Admin needs to specify the following information about the
member:
Member Id
Member Name
Member Category (On specifying Member id, Member Name and Member Category will be
displayed automatically)
8: SearchBook.java
Search Book:
All the users i.e Admin, Clerk and Members have authorized access to the functionality of
'Searching of Book'
Thus, any type of user using the system can search the book.
To search a book, user need not know the complete information about the book.
Even if any 1 Field is known to the user, the book can be searched.
These fields include:
Book Id
Book Name
Book Author
Book Category
Thus, the user has to only fill the information known to him/her and choose the correct field in
order to search a book.
TableDisp.java
9: SearchMember.java
Search Member:
All the users i.e Admin, Clerk and Members have authorized access to the functionality of
'Searching of Member'
Thus, any type of user using the system can search the member.
To search a member, user need not know the complete information about the member.
Even if any 1 Field is known to the user, the member can be searched.
These fields include:
Member Id
Member Name
Thus, the user has to only fill the information known to him/her and choose the correct field in
order to search a member.
10: ColFine.java
Collect Fine:
All the users i.e Admin, Clerk and Members have authorized access to the functionality of
'Collection of fine'.
For Members, this functionality actually behaves as 'Payment of Fine'.
And for Admin and Clerks, they can collect fines from the members.
In order to Collect dues, the following information needs to be filled:
Member Id
Member Name (On specifying Member Id, Member name will be displayed automatically)
11: AddClerk.java
Create New Clerk:
Only Admin has authorized access to the functionality of Creation of new clerks.
Other users i.e Clerks and members don't have access to this functionality.
In order to cerate a new member, Admin has to provide various attributes of the clerk like:
Clerk Id
Clerk Password
12: AddBCat.java
Create new Book Category:
Only Admin has authorized access to the functionality of Creation of new book category.
Other users i.e Clerks and members don't have access to this functionality.
In order to create a new book category, Admin has to provide the following attribute of the book
category:
Category Name
13: AddMCat.java
Create new Member Category:
Only Admin has authorized access to the functionality of Creation of new member category.
Other users i.e Clerks and members don't have access to this functionality.
In order to create a new member category, Admin has to provide the following attributes of the
member category:
Category Name
Days Issued (the maximum number of days for which members of that category can keep
the issued book)
Number Of Books (the maximum number of books that can be issued by members of that
category)
14: In addition to these major functions, some additional features have also been added to the
project . These include:
All the users i.e Admin, Clerk and Members have authorized access to these functionalities.
3.2Back End:
The System includes the following tables:
1 Member
S.NO.
1
2
3
Field Name
ID
Password
Name
Data Type
Number
Number/Text
Text
4
5
6
7
Date of start
Book count
Member Dues
Member Category
Date
Number
Number
Number
Field Name
ID
Name
Author
Reference
Category
Member ID
Date of Issue
Date of Return
Data Type
Number
Text
Text
Number
Text
Number
Date
Date
Field Name
ID
Name
Category
Author
Member ID
Reference
Data Type
Number
Text
Text
Text
Number
Text
Field Name
ID
Password
Data Type
Number
Number/Text
Field Name
Username
Data Type
Text
2 Books
S.NO.
1
2
3
4
5
6
7
8
3 Book search
S.NO
1
2
3
4
5
6
4 Clerks
S.NO.
1
2
5 Users
S.NO
1
Password
Number/Text
Field Name
ID
Name
Book count
Member Category
Book name
Data Type
Text
Text
Number
Text
Text
Field Name
Member category
Category name
Book limit
Date limit
Data Type
Number
Text
Number
Number
Field Name
Category Name
Data Type
Text
Field Name
Book ID
Book name
Book Author
Category
Member ID
Data Type
Number
Text
Text
Text
Number
6 Member Search
S.NO
1
2
3
4
5
7 Member Category
S.NO
1
2
3
4
8 Book category
S.NO
1
9 Issued Books
S.NO
1
2
3
4
5
4. Design Phase
4.1 ER Diagram
B cat
1
m
1
m
B category
Belongs
m
m
1
gs
lo n
Be
Level 0:
Level 1:
Level 2(a)
Level 2(b)
statements, branching statements, decision statements etc. Various exercises were done in this
regard. The concepts of classes, inheritance, and polymorphism were discussed in detail. In the
third week, the graphics were introduced. The Abstract Window Toolkit was studied in detail.
Exercises on developing simple graphical user interfaces were conducted. After that, a brief
introduction was given to the Swing platform and its differences with the AWT were studied.
Some exercises were conducted on the Swing framework. The fourth week involved the study
of JDBC and the database connectivity of Java with backend DBMS Systems such as MySQL
and MS Access using Connector/J JDBC drivers. Concepts of inserting, deleting, updating,
creating and modifying records were developed. Also, file handling concepts were studied. After
the completion of the course, the next two weeks were spent in the development of the project.
Troubleshooting and support were provided by the faculty at Ducat Noida.
6. Testing
1 Login as Admin
Admin can enter the Library Management System only on entering the correct Username and
Password and choosing the correct radiobutton.
4 Issue book:
5 Return Book
6. Delete Book
7 Delete Member
11 Login as Clerk
Clerk can enter the Library Management System only on entering the correct Username and
Password and choosing the correct radiobutton.
12 Search Book
Any book can be searched by providing its correct attribute in the Search Field textfield and
choosing the appropriate radio button. If record is found, it is displayed.
13 Login As Member
14 Search Member
7. Result
The Java core course and training at SQL Technologies has provided me holistic knowledge
about the java programming environment. The work on the project Library Management System
has provided me with in depth knowledge and working of the Swing framework and the usage of
JDBC. The practical work has given great insights into the vista of software development. A fully
running and totally self created project has been successfully developed.
8. Conclusion
After the completion of the project we are sure that the problems in the existing system would
be overcome. The LIBRARY MANAGEMENT SYSTEM process is made computerized to
reduce human errors and to increase the efficiency. The main focus of this project is to lessen
human efforts. The maintenance of the records is made efficient, as all the records are stored in
the ACCESS database, through which data can be retrieved easily.
The Books and Students are given a particular unique id number. So that they can be accessed
correctly and without errors. Our main aim of the project is to get the correct information about a
particular student and books available in the library.
It is expected that this project will go a long way in satisfying user requirements. The
computerization of the Library Management will not only improves the efficiency but will also
reduce human stress thereby indirectly improving human recourses.
9. Future Scope
Reusability: Reusability is possible as and when require in this application. We can update
it next version. Reusable software reduces design, coding and testing cost by amortizing
effort over several designs. Reducing the amount of code also simplifies understanding,
which increases the likelihood that the code is correct.
Cost-effectiveness: Its cost is under the budget and make within given time period. It is
desirable to aim for a system with a minimum cost subject to the condition that it must
satisfy the entire requirement.
10. References