Sunteți pe pagina 1din 64

PREFACE

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

2. Introduction to the programming environment..3


2.1 Introduction to Java.....3
2.2 Characteristics of Java.....3
2.3 Advantages of Java.7
2.4 OOPs Principles...8
2.5 Java Platform...11
2.6 Introduction to MS Access.........14

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

5. Details of the work program..45


6. Testing (Test Cases)46

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:

The software is for automation of library.


We can enter the record of new books and retrieve the details of books available in the

library.
We can issue the books to the students and maintain their records and can also check how

many books are issued.


In this project we can maintain the fine of students who return the issued books after the due
date.

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

of the available books etc.


It can be used in offices and modifications can be easily done according to the
requirements.

1.3 Technologies Used:

Front End : Java


Back End : MS Access

1.4 Project Functionalities:


It provides following facilities to

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:

Can search any book


Can search records of any member
Can issue any book

Can collect fines from members

Member:
Can search any book
Can search records of any member

1.5 Project Assumptions:

User does not have right to enter information about books.


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.

2. Introduction to the programming environment

2.1 Introduction to java


The programming environment Java was used to develop the project. Java was developed by
James Gosling and his team and was initially named as Oak. The Java technology is a
product of Sun Microsystems.

Java is basically an object-oriented programming language with a built-in application


programming interface (API) that can handle graphics and user interfaces and that can be used
to create applications or applets. Because of its rich set of API's, similar to Macintosh and
Windows, and its platform independence, Java can also be thought of as a platform in itself.
Java also has standard libraries for doing mathematics.
Much of the syntax of Java is the same as C and C++. One major difference is that Java does
not have pointers. However, the biggest difference is that one needs to write object oriented
code in Java. Procedural pieces of code can only be embedded in objects.
What's most special about Java in relation to other programming languages is that it lets a
programmer write special programs called applets that can be downloaded from the Internet
and played safely within a web browser. A Java applet cannot write to your hard disk without
your permission. It cannot write to arbitrary addresses in memory and thereby introduce a virus
into your computer. Thus java applets have some security features.

2.2 Characteristics of Java

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

an interpreter for byte code.

Java is too effective:


Java has caused more excitement than any development on the Internet since Mosaic. Java
was the first way to include inline sound and animation in a web page. Java also lets users
interact with a web page. Instead of just reading it and perhaps filling out a form, users can now
play games, calculate spreadsheets, chat in real-time, get continuously updated data and much,
much more.
Here are just a few of the many things Java can do for a web page:

Inline sounds that play in real-time whenever a user loads a page

Music that plays in the background on a page

Cartoon style animations

Real-time video

Multiplayer interactive games

What makes Java special?


Java is a programming language for distributed applications. It doesn't just allow you to add new
types of content to your pages like Netscape and Internet Explorer do. Rather it lets you add
both the content and the code necessary to interact with that content.
e.g. lets say you want to use EPS files on your Web site. Previously you had to wait until at
least one web browser implemented EPS support. Now with the help of java you can write your
own code to view EPS files and send it to any client that requests your page at the same time
they request the EPS file.
e.g. suppose you want people to be able to search your electronic card catalog. However the
card catalog database exists on a mainframe system that doesn't speak HTTP. Before Java you
could hope that some browser implemented your proprietary card catalog protocol or you could
try to program some intermediate cgi-bin on a UNIX box that can speak HTTP and talk to the
card catalog, not an easy task. With Java when a client wants to talk to your card catalog you
can send them the code they need to do so. You don't have to try to force things through an
httpd server on port 80 that were never meant to go through it.
If that were all Java was, it would still be more interesting than a <marquee> or <frame> tag in
some new browser beta.
Java is platform independent. A Java program can run equally well on any architecture that has
a Java enabled browser. With the release of Netscape Navigator 2.0 that includes Windows 95,
Windows NT, the MacOS, Sun Solaris, Sun OS 4.1.3, SGI IRIX, OSF/1, HP-UX with more to
come.
Java isn't just for web sites. Java is a programming language that lets you do almost anything
you can do with a traditional programming language like Fortran or C++. However Java has

learned from the mistakes of its predecessors. It is considerably cleaner and easier to use than
those languages.

2.3 Advantages of Java

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.

2.4 OOPs Principles


The object oriented programming languages provide mechanisms that help you implement the
object oriented model.

Data Hiding and Encapsulation


One of the important object-oriented techniques is hiding the data within the class and making it
available only through the methods. This technique is known as encapsulation because it seals
the data (and internal methods) safely inside the "capsule" of the class, where it can be
accessed only by trusted users (i.e., by the methods of the class).
The most important reason is to hide the internal implementation details of your class. If you
prevent programmers from relying on those details, you can safely modify the implementation
without worrying that you will break existing code that uses the class.
Another reason for encapsulation is to protect your class against accidental or willful stupidity. A
class often contains a number of interdependent fields that must be in a consistent state. If you
allow a programmer (including yourself) to manipulate those fields directly, he may change one
field without changing important related fields, thus leaving the class in an inconsistent state. If,
instead, he has to call a method to change the field, that method can be sure to do everything
necessary to keep the state consistent. Similarly, if a class defines certain methods for internal
use only, hiding these methods prevents users of the class from calling them.
When all the data for a class is hidden, the methods define the only possible operations that can
be performed on objects of that class. Once you have carefully tested and debugged your
methods, you can be confident that the class will work as expected. On the other hand, if all the
fields of the class can be directly manipulated, the number of possibilities you have to test
becomes unmanageable.

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:

Overloading and Overriding.

Dynamic method binding.

2.5 Java platform


A java platform is the hardware or software environment in which a program runs. The java
platform has two components:
1)

Java Virtual Machine (JVM)

2)

Java Application Programming Interface (Java API)

JVM is a standardized hypothetical computer, which is emulated inside your computer by a


program.

Java

Source

Code

Java
Compiler

Java

Object

Code

Java Virtual Machine

Java interpreter

The program executed


By the interpreter

Computer Operating System

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 language fundamentals


Java is purely object-oriented programming language.
Java is neither a superset nor a subset of C / C++.
C++

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.

Java does not support an explicit pointer type.

Java does not have preprocessor.

Java does not support variables arguments to functions.

Java adds many features required for Object-Oriented Programming.

Java and C++

Java does not support operator overloading.

Java does not support multiple inheritances.

Java does not support global variables.

Java has replaced the destructor function with a finalize() function.

Java is a true object-oriented language while C++ is basically C with object-oriented


extension.

Java does not provide the access to the pointers.

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.

Following points are to be noted:

Java is case-sensitive language.


In Java, uppercase and lowercase letters are not the same.

Java is freeform language.


Freeform means that one need not have to indent any lines to make the program work
properly, but it is good practice to use indent to make the program readable.

2.6 Introduction to MS Access


Microsoft Office Access, previously known as Microsoft Access, is a relational database
management system from Microsoft that combines the relational Microsoft Jet Database Engine
with a graphical user interface and software development tools. With Office 95, Microsoft
Access 95 became part of the Microsoft Office Professional Suite joining Microsoft Excel, Word,
and PowerPoint and transitioning from Access Basic to Visual Basic for Applications (VBA).
Since then, there have been releases of Microsoft Access with each release of Office. This
includes Access 97 (version 8.0), Access 2000 (version 9.0), Access 2002 (version 10.0),
Access 2003 (version 11.5), and Access 2007 (version 12.0). It is a member of the Microsoft
Office suite of applications and is included in the Professional and higher versions for Windows
and also sold separately.
Access stores data in its own format based on the Access Jet Database Engine. It can also
import or link directly to data stored in other Access databases, Excel, SharePoint lists, text,
XML, Outlook, HTML, dBase, Paradox, Lotus 1-2-3, or any ODBC-compliant data container
including Microsoft SQL Server, Oracle, MySQL and PostgreSQL. Software developers and
data architects can use it to develop application software and non-programmer "power users"
can use it to build simple applications. Like other Office applications Access is supported by
Visual Basic for Applications, an object-oriented programming language that can reference a
wide variety of objects, including DAO (Data Access Objects) and ActiveX Data Objects, and
many other ActiveX components provided by Microsoft or by third parties. Visual objects used in
forms and reports expose their methods and properties gracefully in the VBA programming
environment, and a huge selection of Windows operating system functions can be declared and
called from VBA code modules, making Access a rich programming environment.

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

Fig 1: Login Page


Further, three categories of User 'Member' have been created

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:

Fig 2: Login of User


After providing Username and Password and clicking on OK button , these fields are verified
with the login details in the database. If the fields match, a new page showing all the
functionalities of that user will be opened.

Fig 3: Main Page

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

Fig 4: Addition of new Book


On clicking on OK button, records will be saved in the database.

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)

Fig 5: Addition of new Member


On clicking on OK button, records will be saved in the database.

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)

Fig 6: Issue of Book


On clicking on OK button, records will be saved in the database and book will be issued to the
respective member.

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).

Fig 7: Return of Book


On clicking on Return Book button, book will be returned.
But, if the book that hasnt been issued is tried to be returned, an error message would be
displayed.

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)

Fig 8: Deletion of Book


On clicking Delete Book button, record of that book would be deleted.
But, if the book is held by some member, then its record wont be deleted.

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)

Fig 9: Deletion of Member


On clicking Delete Member button, records of that member would be deleted.
But , if any member holds some book, then his record wont be deleted.

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.

Fig 10: Searching of Books


On clicking FindBook button, it would call TableDisp.java and a table showing the records of the
book that was searched, would be displayed.

TableDisp.java

Fig 11: Display of searched Book

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.

Fig 12: Searching of Member


On clicking on Find Member button, records of that member would be displayed.
If incorrect field is provided, an error message would be displayed.

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)

Fig 13: Collection of fines


On clicking on Pay Fine button, a confirmation message would be displayed.
On clicking Yes in confirmation message, the dues of that member would be paid.

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

Fig 14: Creation of new Clerk


After providing, necessary fields; on clicking OK button, record of New Clerk would be saved in
the database.

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

Fig 15: Creation of new Book Category


On clicking OK button, a new book category with the provided name would be created.

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)

Fig 16: Addition of new Member Category


On clicking OK button, a new Member category would be saved in the database.

14: In addition to these major functions, some additional features have also been added to the
project . These include:

Change Background Colour


Close Active Window (i.e the window which was opened earlier, will be closed first; in case

many windows have been opened)


Close All Windows

All the users i.e Admin, Clerk and Members have authorized access to these functionalities.

Fig 17: Changing Background Colour

15: Shortcut Keys


Another additional feature has been included in the system for the convenience of the Users.
Shortcut Keys are provided for every functionality of the system.
All the users i.e Admin, Clerk and Members have authorized access to the Shortcut Keys.

Fig 18: Shortcut Keys


16: Exit from Library System

Fig 19: Exit From Library System


On clicking Yes button, user can exit from the Library Management System.

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

4.2 Data Flow Diagram (DFD)

Level 0:

Level 1:

Level 2(a)

Level 2(b)

5. DETAILS OF THE WORK PROGRAM


The program consisted of a 2 hour lecture session followed by a practical session after every
two days. The first week of the program dealt with the concepts of OOPS, the basic features of
Java and its fundamental programming. In the second week, actual programming in java began
with the introduction and study of data types basic procedural language features such as control

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

Various Test Cases used to check the validity of System:

1 Login as Admin

Fig 20: Login As Admin

Admin can enter the Library Management System only on entering the correct Username and
Password and choosing the correct radiobutton.

2 Add new Book

Fig 21: Addition of new Book


Admin can add new book only if it has unique book id. If a book with same id has already been
saved, the following message would be displayed and that book wont be saved.

3 Add new Member:

Fig 22: Addition of new Member


Members only with unique member id can be added to the system. If a member with already
existing id is added, the following message would be displayed and that member wont be
added.

4 Issue book:

Fig 23: Issue of Book


Reference books cant be issued.
If it is tried to be issued, the following error message would be displayed

5 Return Book

Fig 24: Return of Book


If book id of any book is provided that has not been issued to the Return Book Panel, an error
message Not an issued book is displayed.

6. Delete Book

Fig 25: Deletion of Book


On pressing yes, the record would be deleted

7 Delete Member

Fig 26: Deletion of Member


On pressing yes, record would be deleted.

8 Create New Clerk

Fig 27: Creation of new Clerk


Clerks only with unique clerk id can be added to the system. If a clerk with already existing id is
added, the following message would be displayed and that clerk wont be created.

9 Create New Book Category

Fig 28: Creation of new Book Category


If a new Book Category with already existing name is tried to be added, an error message
Already existing category would be displayed and that category wont be created else that
category is created.

10 Create new member Category

Fig 29: Addition of new Member Category


If a new Member Category with already existing name is tried to be added, an error message
Already existing category would be displayed and that category wont be created else that
category is created.

11 Login as Clerk

Fig 30: 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

Fig 31: Search and Display of 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

Fig 32: Login As Member


Member can enter the Library Management System only on entering the correct Username and
Password and choosing the correct radiobutton.

14 Search Member

Fig 33: Searching of Member


Any Member can be searched by providing his/her correct information in the Search Field
textfield and choosing the correct radiobutton.

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.

Understandability: A method is understandable if someone other than the creator of the


method can understand the code (as well as the creator after a time lapse). We use the
method, which small and coherent helps to accomplish this.

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

The Complete Reference Java 2(McGrawhill Herbert Schildth fifth edition)


Java.sun.com
Head First Java
Sun Microsystems Java Course Module

S-ar putea să vă placă și