You are on page 1of 39

INDIVIDUAL ASSIGNMENT

LIBRARY MANAGEMENT SYSTEM


CT038-3-2-OODJ

OBJECT-ORIENTED DEVELOPMENT WITH JAVA

NP2F1701IT

Anu Shrestha (NP000019)

HAND OUT DATE: 28 August 2017

HAND IN DATE: 31 October 2017

WEIGHTAGE: 50%

INSTRUCTIONS TO CANDIDATES

1. Submit your assignment to the administration counter.


2. Students are advised to underpin their answers with the use of references (sites
using the Harvard Name System of Referencing)
3. Late submission will be awarded zero (0) unless Extenuating Circumstances (EC)
are upheld
4. Cases of plagiarism will be penalized
5. The assignment should be bound in an appropriate style (Comb Bound or Stapled)
6. Where the assignment should be submitted in both hardcopy and softcopy, the
softcopy of the written assignment and source code (where appropriate) should be
on a CD in an envelope/ CD cover and attached to the hardcopy.
7. You must obtain 50% overall to pass this module
Acknowledgement
This project report is prepared for the partial fulfillment of the requirement for the degree
of BSc.IT in accordance to the rules and regulations prescribed by Asia Pacific University
(APU). I would like to express our deepest gratitude to our college Lord Buddha Education
Foundation (LBEF) and our university APU which provided this opportunity to learn
several things. This project wouldn’t be completed without the kind cooperation of faculties
of this college.

Further, I am grateful to Mr. Aryan Thakur faculty member of OBJECT-ORIENTED


DEVELOPMENT WITH JAVA for his guidance and help to complete this project. I also
would like to show our appreciation to all who supported directly or indirectly to complete
this project in limited timeframe.

Sincerely,

Anu Shrestha

NP000019
Table of Contents
List of Figure......................................................................................................................... i
List of Table .........................................................................................................................ii
1 Introduction .................................................................................................................. 1
1.1 Existing System ..................................................................................................... 1
1.2 Problem Statement ................................................................................................ 2
1.3 Objective ............................................................................................................... 2
2 Hardware and Software Requirement........................................................................... 3
2.1 Hardware Requirement ......................................................................................... 3
2.2 Software Requirement ........................................................................................... 3
3 Feasibility Study ........................................................................................................... 4
3.1 Operational Feasibility Study ................................................................................ 4
3.2 Technical Feasibility Study ................................................................................... 4
3.3 Schedule Feasibility Study .................................................................................... 5
4 Description and justification of the design ................................................................... 6
4.1 Use case diagram ................................................................................................... 6
4.1.1 Use Case Description ..................................................................................... 7
4.2 Activity diagram .................................................................................................. 12
4.3 Class diagram ...................................................................................................... 15
5 Implementation ........................................................................................................... 16
5.1 Class .................................................................................................................... 16
5.2 Object .................................................................................................................. 16
5.3 Inheritance ........................................................................................................... 17
5.4 Abstraction .......................................................................................................... 17
5.5 Polymorphism ..................................................................................................... 17
5.6 Encapsulation ...................................................................................................... 17
5.7 Constructor .......................................................................................................... 18
5.8 File Handling ....................................................................................................... 18
5.9 ArrayList ............................................................................................................. 19
6 Backup System ........................................................................................................... 20
7 Validation ................................................................................................................... 20
8 Testing ........................................................................................................................ 21
9 Sample Outcome......................................................................................................... 22
9.1 Login Page........................................................................................................... 22
9.2 Guest Panel .......................................................................................................... 23
9.3 Librarian Panel .................................................................................................... 24
9.4 Administrator Panel............................................................................................. 25
10 Additional Feature ...................................................................................................... 26
11 Conclusion .................................................................................................................. 27
References ............................................................................................................................ I
Appendix ............................................................................................................................. II
Appendix I: Questionnaire .............................................................................................. II
Appendix II: Referee...................................................................................................... III
Appendix III: Gantt Chart ............................................................................................... V
Marking Grid .....................................................................................................................VI
List of Figure
Figure 1: Use Case Diagram ................................................................................................ 6
Figure 2: Login Activity Diagram ..................................................................................... 12
Figure 3: Add Book Activity Diagram .............................................................................. 12
Figure 4: Add Librarian Activity Diagram ........................................................................ 12
Figure 5: Add Member Activity Diagram ......................................................................... 13
Figure 6: Delete record Activity Diagram ......................................................................... 13
Figure 7: Update Record Activity Diagram ....................................................................... 13
Figure 8: Search Book Activity Diagram .......................................................................... 14
Figure 9: Check-Out Book Activity Diagram .................................................................... 14
Figure 10: Check-In Book Activity Diagram .................................................................... 14
Figure 11: Reporting Activity Diagram ............................................................................. 14
Figure 12: Class Diagram .................................................................................................. 15
Figure 14: Showing Book Class ........................................................................................ 16
Figure 15: Showing object ................................................................................................. 16
Figure 16: Showing inheritance of interface ...................................................................... 17
Figure 17: Showing encapsulation ..................................................................................... 17
Figure 18 : Showing Constructor ....................................................................................... 18
Figure 19: File Handling .................................................................................................... 18
Figure 20: Use of ArrayList ............................................................................................... 19
Figure 21: Validation ......................................................................................................... 20
Figure 22: Login Form ....................................................................................................... 22
Figure 23: Guest Dashboard .............................................................................................. 23
Figure 24: Librarian Dashboard ......................................................................................... 24
Figure 25: Administrator Dashboard ................................................................................. 25

i
List of Table
Table 1: Login Use Case Description .................................................................................. 7
Table 2: Maintain Librarian Record Use Case Description ................................................. 7
Table 3 Add Member Record Use Case Description ........................................................... 8
Table 4 Maintain Member Record Use Case Description ................................................... 8
Table 5: Adding New Book Use Case Description ............................................................. 9
Table 6: Maintain Book Use Case Description.................................................................... 9
Table 7: Search Book Information Use Case Description ................................................. 10
Table 8: Check in Book Use Case Description .................................................................. 10
Table 9: Check Out Book Use Case Description ............................................................... 11
Table 10: Reporting Use Case Description ........................................................................ 11

ii
1 Introduction
Knowledgica is a new public library in a modern city. It is planned to develop a Library
Management System (LMS) for Knowledgica. The LMS provides functionalities to
support the library’s books management. The LMS provides the ability to store records
about the full list of the owned books by the library, Books status (Available or Borrowed).
In addition, it supports a range of services including the adding of new titles to the library’s
books list, deleting, modifying book information, searching for a book title, check-in a
book, check-out a book, and reporting. The users of this system are administrators,
Librarians, and guests (Library’s visitors).

Besides, a supporting document is needed to reflect that the design utilizes object oriented
programming concepts.

1.1 Existing System


Knowledgica Library has manual system for maintaining records of library. All records
like User records, Member records, Book records, and Book transaction records are kept in
file. For requirement gathering, two different libraries are visited. Both library use Koha
open software as library management software. Before Koha software, both libraries faced
certain problems in library management system.

LBEF Library

Before there was manual based system where records were kept on register file. Difficulties
faced while using file based system were:

 Time consuming for keeping records


 No security of data
 Student has to ask about book to librarian
 Difficult to find the books
Kaiser Library

Problem faced while using file based system are

 High Chance of error


 Cause problem to search book due to wrong information
 Time consuming to keep records
 Inaccurate and less accessible

1
1.2 Problem Statement
Manual System is practice in Knowledgica Library. Due to this, the performance of existing
system is slow and inefficient. There is high chance of misplace of records which result in
low security of information. It is also difficult to setup a backup. This system is causing
problem for both user and member. It takes a lot of time for searching book and member
has to ask to librarian about books and its location. Due to this it takes lot of time for check-
out and check-in process. So that these problems can be overcome through computerized
library management system which can be used by both user and member.

1.3 Objective
The objectives of this project are as below:

 To develop a computerized library management system.


 To overcome problem of manual system
 To make performance fast and efficient
 To maintain information security.
 To maintain record in effective and efficient way.

2
2 Hardware and Software Requirement
2.1 Hardware Requirement
Microsoft Windows Vista SP1/Windows 7 Professional:
Processor: 800MHz Intel Pentium III or equivalent

Memory: 512 MB

Disk space: 750 MB of free disk space

(Anon., 2015)

2.2 Software Requirement


The minimum requirement of software is:

NetBeans IDE 8.1

Java SE Development Kit (JDK) 7

(Anon., 2015)

3
3 Feasibility Study
3.1 Operational Feasibility Study
Operational feasibility includes study of performance, information, economy, control
efficiency and control of system. Since performance of existing system is slow due to
manual system. There are high chance of human error due may cause wrong information
or misplace information and so on. There is less security of information in the library due
to manual system. For maintaining information of library, it requires more number of
employees to maintain them. Due to this it causes high cost for salary and lost of time. The
service provides by existing system is low and slow.

The performance of existing system can be enhanced by using computerized system. The
proposed system which helps to make system fast and efficient. Since only authorized user
can access the system there is high level of data security. Data can be management by single
employees which reduce the cost for salary. The proposed system can overcome all
problem in existing system of library.

3.2 Technical Feasibility Study


For implementation of computerized Library Management System in Knowledgica
Library, the library should able to afford system. So that technical feasibility study is done.
Since library is maintaining records of books, users, member, check-in book, check-out
book and reporting in manual way. There is no application software in library. Application
Software with database will help to maintain record of all tasks of the library in effective
and efficient way.

Under technical feasibility study, the focus is on factors that are require managing
information. For proper utilization of system employee should train to use the system.
Technical requirement for implementation of the system are as follows.

Computers with hardware requirement:

 Microsoft Windows 7 Professional or higher:


 Processor: Intel Core i5 or equivalent
 Memory: 2 GB (32-bit), 4 GB (64-bit)
 Disk space: 1.5 GB of free disk space

4
3.3 Schedule Feasibility Study
The Knowledgica Library Management System is excepted to complete the whole project
within two months. Schedule feasibility is done to determine whether the project can
complete on time or not. The high-level schedule is prepared to complete the project on
time.

5
4 Description and justification of the design
4.1 Use case diagram

Knowledgica Library Management System

Reporting Verification
Add Librarian
<<include>>

Modify Librarian
Login <<extend>> Record

<<extend>>
Delete Librarian
Maintain Librarian <<extend>> record
Records Modify Member
Record
<<extend>>
Maintain Member
Records <<extend>> Delete Member
Record
Administrator Member

Add Member Borrow Book


Record Search Book

Modify Book
Record
<<extend>>

Maintain Book Delete Book


<<extend>>
Records Record Guest
Add Book Record

Late Return
<<include>>
<<extend>>
Fine
<<include>>
Check-in book <<extend>> Damage Book
<<include>>
Librarian <<extend>>

Check-out book
Lost Book

Change Password

Verification
<<include>>
Login

Figure 1: Use Case Diagram

(James Rumbaugh, 2004)

6
4.1.1 Use Case Description
Use Case Login
Brief Description Only authorized users can use the system
Actors Administrator, Librarian
Main Flow a. Login form will display
b. Actors can enter their username and password
c. The system will verify their username and
password.
Alternative Flow a. Invalid username or password
Post Condition Login successful
Table 1: Login Use Case Description

Use Case Maintain Librarian records


Brief Description Only administrators can maintain librarian records that
means create, delete and update
Actors Administrator
Main Flow a. Admin dashboard is displayed
b. Select Librarian
c. View Librarian List
d. To add select add
e. Form is displayed
f. User information is filled
g. Click on Add then Librarian is added
h. Similar other process is carried out
Alternative Flow a. User id already exist
Post Condition Record created/deleted/update successfully.
Table 2: Maintain Librarian Record Use Case Description

7
Use Case Add Member records
Brief Description Both Administrator and Librarian can add member
records
Actors Administrator, Librarian
Main Flow a) Admin dashboard is displayed
b) Select Member
c) View Member List
d) To add select add
e) Form is displayed
f) User information is filled
g) Click on Add
Alternative Flow h) Card Number already exist
Post Condition Record created successfully.
Table 3 Add Member Record Use Case Description

Use Case Maintain Member records


Brief Description Only administrators can maintain member records that
mean update and delete record
Actors Administrator
Main Flow a. Admin dashboard is displayed
b. Select Member
c. View Member List
d. Select respected process
e. Click on related button
Post Condition Record deleted/update successfully.
Table 4 Maintain Member Record Use Case Description

8
Use Case Adding new books
Brief Description Administrator and Librarian can add book in the library’s
book list.
Actors Administrator, Librarian
Main Flow a. Select Book Option
b. Book list is displayed
c. Click on add to add book
d. Form is displayed
e. Fill the book information in form
f. Click on add
Alternative Flow g. Descriptions not recorded properly.
Post Condition New book is added
Table 5: Adding New Book Use Case Description

Use Case Maintain book


Brief Description Administrators can maintain book record. It can update or
delete the book record.
Actors Administrators
Main Flow a. Book list is displayed in tabular form.
b. Select respective button to perform process
c. Fill the form and click on button
Post Condition Book is successfully updated/ book is deleted.
Table 6: Maintain Book Use Case Description.

9
Use Case Search book information
Brief Description All user can search book through title
Actors Administrator, Member, Librarian, Guest
Main Flow a. Search box is displayed
b. Enter the title of book
c. Respected detail of book is displayed
Alternative Flow d. Book not found
Post Condition Display book list.
Table 7: Search Book Information Use Case Description

Use Case Check in book


Brief Description Administrators and Librarians can check in the book
which are issued by members.
Actors Administrators, Librarians
Main Flow a. Book transaction consist of return book option
b. Fill the form which consists book detail
c. Click on Issue
Alternative Flow d. Book with fine
Post Condition Check in a book
Table 8: Check in Book Use Case Description

10
Use Case Check out book
Brief Description Administrators and Librarians can check out the book to
members.
Actors Administrators, Librarians
Main Flow a. Book transaction consist of check out option
b. Fill the form related to book
c. Click on Issue
Alternative Flow d. Book not available
Post Condition Check out a book
Table 9: Check Out Book Use Case Description

Use Case Reporting


Brief Description Administrators can prepare a report for a book transaction
Actors Administrators
Main Flow a. Book transaction panel is displayed
b. Member panel is displayed
c. Librarian Panel is displayed
Alternative Flow d. Create a transaction report
Post Condition Report created
Table 10: Reporting Use Case Description

11
4.2 Activity diagram
Display error
message
Invalid User

Enter Username Check in file for Check in file for


Valid User user information
and Password user information

Administrator/
Librarian

Figure 2: Login Activity Diagram

Display error
message
Error
Occured

Enter book Book Successfully


Add Book Successful added
information

Administrator/
Librarian
Check in file Store in file

Figure 3: Add Book Activity Diagram

Display error
message
Error
Occured

Enter Librarian Librarian


Add Librarian Successful Successfully
information
added

Administrator

Check in file

Store in file

Figure 4: Add Librarian Activity Diagram

12
Display error
message

Error
Occured

Member
Enter Member Successfully
Add Member Successful
information added

Administrator/
Librarian
Check in file
Store in file

Figure 5: Add Member Activity Diagram

Select related Record


Delete Record sucessfully delete
information

Administrator

Delete from
Check in file
file

Figure 6: Delete record Activity Diagram

Display error
message
Error
Occured

Record
Update Fill information Successful successfully
Records to update update

Administrator

Check in file
Update in file

Figure 7: Update Record Activity Diagram

13
Not
Available

Enter Book Book record


Search Book
Title Available
display
Administrator/
Librarian/
Guest/Member
Check in file

Figure 8: Search Book Activity Diagram

Enter require
Issue Book Check-out book
information

Administrator/
Librarian

Record in file

Figure 9: Check-Out Book Activity Diagram

Enter require
Return Book Check-in book
information

Administrator/
Librarian

Update record
in file

Figure 10: Check-In Book Activity Diagram

Select required
Report Display respected
report
record

Administrator/
Librarian

Select from file

Figure 11: Reporting Activity Diagram

14
4.3 Class diagram

Figure 12: Class Diagram

15
5 Implementation
5.1 Class
A class is a “blueprint” for an object is a code template used to generate objects. It contains
instructions that define the properties and methods that an object can use (Anon., n.d.) (T.V
Suresh Kumar, 2011) . In the project, different model class has created.

Figure 13: Showing Book Class

5.2 Object
Objects are elements from the script that are defined to perform the instructions written in
a class, and can use the properties and methods defined in the class (Anon., n.d.). In the
project, every class has its own object for its implementation.

Figure 14: Showing object

16
5.3 Inheritance
Inheritance is the process of acquiring the properties (fields or method) of other class which
is managed in hierarchical order. Extends keyword is used to inherit the properties of other
class (Anon., 2017). In the project, inheritance is used for inheriting the attributes from
parent class. In figure 16, Bookinformation class inherits attributes of Book class.

Figure 15: Showing inheritance of interface

5.4 Abstraction
Abstraction is the process of hiding the implementation details from the user and allow the
functionality detail only. (Anon., 2017)

5.5 Polymorphism
Polymorphism is the ability of an object to take many form. The most common use of
polymorphism in OOP occurs when a parent class reference is used to refer to a child class
object.

5.6 Encapsulation
Encapsulation is the process of binding fields and methods together. In encapsulation the
variables of class will be hide from other classes, and can be accessed only through the
methods of their current class. It is known as data hiding. (Anon., 2017) The variable of
class has encapsulated in the project.

Figure 16: Showing encapsulation

17
5.7 Constructor
Constructor has name as its class which is used to initialize the object of class so that task
can be perform by executing java code. Constructor can be considered as special type of
method with no return type and cannot abstract. This special type of method can work
within class only. There are three types of constructor that are default constructor, no
parameterized constructor and parameterized constructor. In the project, default constructor
and no parameterized constructor are used. (Eckel, 2006)

Figure 17 : Showing Constructor

5.8 File Handling


File Handling is used in this project to perform certain task like created file, read file, and
write file. All the information is store in file so that file handling is used to create a data
base of the system. Two classes of java is used in this project i.e. FileWriter and FileReader.
FileWriter is used to write in file and FileReader is used to read from file. In order to
increase the speed of execution BufferWriter is used.

Figure 18: File Handling

18
5.9 ArrayList
ArrayList class is a dynamic array which are used to store elements. In this project,
ArrayList class is used to store records in file. It allows store to number of data in file as
per user.

Figure 19: Use of ArrayList

19
6 Backup System
All the data of the proposed system is stored in file as database. These files can be stored
in server and other devices for backup.

7 Validation

Figure 20: Validation

20
8 Testing
Testing of system is done for evaluation of system to check whether requirement is fulfilled
or not. Two types of testing are done for system evaluation. Unit testing is done in which
code and design of each component are tested. This type of testing is known as white-
testing. This testing while developing this system to check whether requirement is fully
satisfied or not. After unit testing, system testing is done by combination of all modules or
entire system is tested. During system testing different number of records are added, update
and delete. The records consist of book details, member details, librarian details and carried
out book transaction process. As a result, all the requirement of system is fulfilled. (Cem
Kaner, 2001)

21
9 Sample Outcome
9.1 Login Page

Figure 21: Login Form

Above figure show the login form which allow administrator and librarian to access the
system.

22
9.2 Guest Panel

Figure 22: Guest Dashboard

Guest Panel show the list of books that available in library and allow to search the book.
There is a login option for administrator and librarian to access the system.

23
9.3 Librarian Panel

Figure 23: Librarian Dashboard

Librarian panel consists of different option like member, book, and transaction. Member
option allow to add member, update member record, show members. Books option gives
furthermore sub option to check stock, publication, category, book lists and shelf. Other
sub options are update book records. Transaction deal with check-in and check-out of a
book.

24
9.4 Administrator Panel

Figure 24: Administrator Dashboard


Administrator panel consists of four options like book, book transaction, member, and
users. Book option provides the authority like in the librarian panel but there is extra
authority to delete the book records. Similarly, transaction and Member provide same
authority and allow to delete the records. Users option is the extra option than Librarian
panel. User panel allow to add new librarian, view librarian record, update and delete user’s
records.

25
10 Additional Feature
Knowledgica Library Management System consists of extra features. They are mentioned
below.

 Fine System
 Librarian can also add member and modify records of member.

26
11 Conclusion
This project is about library management system for Knowledgica Library. This system is
developed by using NetBeans 8.1. It consists of design description and justification which
include use case diagram, activity diagram and class diagram. This design show how the
system is going to work. Different features of OOPs are used for developing this system
which helps to make system more effective and efficient.

27
References
Anon., 2015. NetBeans. [Online]
Available at: https://netbeans.org/community/releases/81/relnotes.html#req_sw
[Accessed September 2017].
Anon., 2017. Javatpoint. [Online]
Available at: https://www.javatpoint.com/java-arraylist
[Accessed October 2017].
Anon., 2017. tutorialspoint. [Online]
Available at: https://www.tutorialspoint.com/java/java_inheritance.htm
[Accessed October 2017].
Anon., 2017. tutorialspoint. [Online]
Available at: https://www.tutorialspoint.com/java/java_abstraction.htm
[Accessed October 2017].
Anon., 2017. tutorialspoint. [Online]
Available at: https://www.tutorialspoint.com/java/java_encapsulation.htm
[Accessed October 2017].
Anon., 2017. tutorialspoint. [Online]
Available at: https://www.tutorialspoint.com/java/java_polymorphism.htm
[Accessed October 2017].
Anon., n.d. CoursesWeb. [Online]
Available at: http://coursesweb.net/actionscript/oop-classes-objects
[Accessed October 2017].
Anon., n.d. GeeksforGeeks. [Online]
Available at: http://www.geeksforgeeks.org/file-handling-java-using-filewriter-filereader/
[Accessed October 2017].
Cem Kaner, J. B. B. P., 2001. Lessons Learned in Software Testing. 1st ed. New Delhi:
John Wiley and Sons.
James Rumbaugh, I. J. B., 2004. Unified Modeling Language Reference Manual. 2nd ed.
s.l.:Pearson Higher Education.
Paul Deitel, H. D., 2015. Java How To Program. 10th ed. s.l.:Pearson Education Limited.
Schildt, H., 2014. Java: A Beginner's Guide. 6th ed. s.l.:McGraw Hill Professional.
T.V Suresh Kumar, B. R. P., 2011. Programming with JAVA. s.l.:Dorling Kindersley Pvt.
Ltd..

I
Appendix
Appendix I: Questionnaire
Questionnaire consists of set of questions that was asked to head of two different libraries
i.e. LBEF Library and Kasier Library. Questions that are used in questionnaire are given
below:

1. What type of system is used by Library?


2. Name of software used by Library (if used).
3. What are difficulties faced while using file based management system?
4. What are information that are include while add books?
5. What are information that are include while member books?

II
Appendix II: Referee
Name: Navin Rayamajhi Post: Head of LBEF library
Contact: 9841278157
Address: Batiputali, Kathmandu

III
Name: Dashrath Mishra Post: Chief of Kaiser Library
Mobile No: 9841473845 Telephone No.: +977- 411318
Email: dapsmishra@gmail.com

IV
Appendix III: Gantt Chart

V
Marking Grid
Program Solution and Research Report (30%) Individual
Diagramming (60%) Assignment

Anu Shrestha

(NP000019)

Criteria Marks Criteria: Marks


Allocated Allocated

Requirement 30% Report Structure: 10%


Analysis:
Professional
- Use case diagram
Report Format
- Activity diagram
- Class diagram References

Implementation: 30% Program 20%


Documentation:
- User Login
Authentication Object oriented
- Books implementation
management and codes and any
user panels additional functions
- Reporting

Presentation (10%)

 Ability to answer questions addressed by the 10%


lecturer pertaining to the work done and presented

Workload Matrix

Name of Student Percentage Signature


Anu Shrestha (NP000019) 100%

VI

You might also like