You are on page 1of 60

SAD PROJECT

ON
LIBRARY MANAGEMENT

Submitted in Partial Fulfillment of the Requirements


For the Degree of
Bachlor of Technology In Comp.Science Engg.
BY
Chandan Verma [11853]
Lokeshwar Singh [11855]
Apoorva Misra [11851]
Pramod Kumar [ 50204]

Under the Guidance of


Miss Disha Guleria
Department of Computer Science Engineering

Library Management System (CSE 4th sem)


CERTIFICATE

This is to certify that the SAD Project entitled “Library Management System” submitted by
Chandan Verma,Lokeshwar Singh,Apoorva Misra,Pramod Kumar having Roll Number
11853,11855,11851,50204 for the partial fulfillment of the requirements of Bachlor of
Technology In Computer Science Engg. degree of Bells Institute of Management &
Technology,Shimla.

Bells Institute of Management & Technology


Shimla-17009

Library Management System (CSE 4th sem)


CERTIFICATE FROM INTERNAL SUPERVISOR

This is to certify that the SAD Project entitled Library Management System submitted by
Chandan Verma,Lokeshwar Singh,Apoorva Misra,Pramod Kumar having Roll Number
11853,11855,11851, 50204 for the partial fulfillment of the requirements of Bachlor of
Technology In Computer Science Engg. degree of Bells Institute of Management &
Technology,Shimla, embodies the bonafide work done by him/her under my/our supervision.

Signature of Internal Supervisor


Name :
Designation:
Employee Organization:

CERTIFICATE FROM THE EXTERNAL SUPERVISOR


Library Management System (CSE 4th sem)
This is to certify that the SAD Project entitled Library Management System submitted by
Chandan Verma,Lokeshwar Singh,Apoorva Misra,Pramod Kumar having Roll Number
11853,11855,11851,50204 for the partial fulfillment of the requirements of Bachlor of Technology
In Computer Science Engg. degree of Bells Institute of Management & Technology,Shimla,
embodies the bonafide work done by him/her under my/our supervision.

Signature of External Supervisor:


Name:
Designation:
Employee Organization:

DECLARATION

Library Management System (CSE 4th sem)


I hereby declare that this project work titled “Library Management system ” is my original
work and no part of it has been submitted by me for any other diploma/degree course purpose
or published in any other institute till date.

Chandan Verma
Lokeshwar Singh
Apoorva Misra
Pramood Kumar

Library Management System (CSE 4th sem)


ACKNOWLEDGEMENT
A person is successful only when he grabs every opportunity in his way and works hard on it.
This is only possible when he is guided by somebody. We also got such an apportunity that
was to do a project for “Library Management system ”

First of all We would like to thank our project guide Miss Disha Guleria for sparing her
precious time, cooperating making suggestion and creative and guiding us through
out.Working under her was a good learning experience which will always be remembered. I
also grateful to her sparing valuable time and providing with the required material and
information for study. I also express our deep sense of gratitude to other lecturers of Computer
Science Engg. Deptt. For bearing and cooperating with us and helping us through out the
project.

Project Mambers

Chandan Verma
Lokeshwar Singh
Apoorva Misra
Pramood Kumar

Library Management System (CSE 4th sem)


CONTENTS

Topic Page No.

Chapter 1 Introduction 1
1.1 Process Description 1
1.2 Hardware and Software requirements 4
1.3 Phases in Development of Department Software 5
1.4 Software Life Cycle Model 6

Chapter 2 Planning 7
2.1 Problem Description 7
2.2 System Study 8
2.3 Feasibility Study 9

Chapter 3 Analysis 11
3.1 Analysis 11
3.2 Components of SRS 12

Chapter 4 Design 13
4.1 Design 13
4.2 Level 0 DFD Diagram 14
4.3 Level 1 DFD Diagram 15
4.4 Level 2 DFD Diagram 17
4.5 E-R Digram 19

Chapter 5 Implementation 20
5.1 Implementation 20
5.2 Testing 20
5.3 Levels of Testing 21

Chapter 6 Coding 25

Library Management System (CSE 4th sem)


Chapter 7 Result 42

Chapter 8 Conclusion and Future Scope 50


8.1 Conclusion 50
8.2 Future Scope 51
8.3 Drawbacks 51

Chapter 9 References and Bibliography 52


9.1 References 52
9.2 Bibliography 52

Library Management System (CSE 4th sem)


1
INTRODUCTION
INTRODUCTION

The project titled “Library Management System” is Library management software for
monitoring and controlling the transactions in a library.The project “Library Management System”
is developed in c++ language, which mainly focuses on basic operations in a library like adding
new member, new books, and updating new information, searching books and members and
facility to borrow and return books.

This project of “Library Management System” of gives us the complete information about the
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 and stock available in the library. In this project we can maintain the late
fine of students who returns the issued books after the due date.

1.1PROCESS DESCRIPTION

The Library Management System is designed & developed for a receipt and issuance of books in
the library along with the student’s details. The books received in the library are entered in Books
Entry form and the new student is entered in the student entry form. When the student wants to get
the desired book the same is issued on the availability basis to the student. The issuance and due
date for the returning of the book is also entered into the Book Issue form under third menu Book
Issue. The student has to pay the fine if any on the basis of no. of days delayed deposit of the book
in the library.

INTRODUCTION TO C++

C++ is an extension to C Programming language. It was developed at AT&T Bell Laboratories in


the early 1980s by Bjarne Stroustrup. It is a deviation from traditional procedural languages in the
sense that it follows object oriented programming (OOP) approach which is quite suitable for
managing large and complex programs.

An object oriented language combines the data to its function or code in such a way that access to
data is allowed only through its function or code. Such combination of data and code is called an
object.

Library Management System (CSE 4th sem)


A BRIEF HISTORY OF C++

The C++ programming language was introduced by Bjarne Stroustrup of the AT&T laboratories in
1985 as an extension of C, with additional features borrowed from the esoteric language Simula.
Since then, C++ has grown rapidly in response to the practical need for a programming language
that is able to efficiently handle composite and diverse data types. The language implementation is
pivoted on the ingenious concept of object oriented programming (OOP). Today, C++ dominates
the commercial market and is favored among system programmers and application developers.

C++ is a generalization of C, but accomplishes much more than C, to the extent that it should be
regarded, studied, and taught as a separate language. It is neither necessary nor recommended to
study C as a prerequisite of C++, though knowledge of C can be helpful.

FEATURE OF C++

Before starting to learn C++ it is essential to have a basic knowledge of the concepts of Object
oriented programming. Some of the important object oriented features are namely:

• Objects
• Classes
• Inheritance
• Data Abstraction
• Data Encapsulation
• Polymorphism
• Overloading
• Reusability

In order to understand the basic concepts in C++, a programmer must have a good knowledge of
the basic terminology in object-oriented programming. Below is a brief outline of the concepts of
object-oriented programming languages :

Objects:

Object is the basic unit of object-oriented programming. Objects are identified by its unique name.
An object represents a particular instance of a class. There can be more than one instance of a
class. Each instance of a class can hold its own relevant data.

An Object is a collection of data members and associated member functions also known as
methods.

Classes:

Classes are data types based on which objects are created. Objects with similar properties and
methods are grouped together to form a Class. Thus a Class represents a set of individual objects.

Library Management System (CSE 4th sem)


Characteristics of an object are represented in a class as Properties. The actions that can be
performed by objects become functions of the class and are referred to as Methods.

For example consider we have a Class of Cars under which Santro Xing, Alto and WaganR
represents individual Objects. In this context each Car Object will have its own, Model, Year of
Manufacture, Color, Top Speed, Engine Power etc., which form Properties of the Car class and the
associated actions i.e., object functions like Start, Move, and Stop form the Methods of Car Class.

No memory is allocated when a class is created. Memory is allocated only when an object is
created, i.e., when an instance of a class is created.

Inheritance:

Inheritance is the process of forming a new class from an existing class or base class. The base
class is also known as parent class or super class. The new class that is formed is called derived
class. Derived class is also known as a child class or sub class. Inheritance helps in reducing the
overall code size of the program, which is an important concept in object-oriented programming.

Data Abstraction:

Data Abstraction increases the power of programming language by creating user defined data
types. Data Abstraction also represents the needed information in the program without presenting
the details.

Data Encapsulation:

Data Encapsulation combines data and functions into a single unit called Class. When using Data
Encapsulation, data is not accessed directly; it is only accessible through the functions present
inside the class. Data Encapsulation enables the important concept of data hiding possible.

Polymorphism:

Polymorphism allows routines to use variables of different types at different times. An operator or
function can be given different meanings or functions. Polymorphism refers to a single function or
multi-functioning operator performing in different ways.

Overloading:

Overloading is one type of Polymorphism. It allows an object to have different meanings,


depending on its context. When an existing operator or function begins to operate on new data
type, or class, it is understood to be overloaded.

Reusability:

This term refers to the ability for multiple programmers to use the same written and debugged
existing class of data. This is a time saving device and adds code efficiency to the language.

Library Management System (CSE 4th sem)


Additionally, the programmer can incorporate new features to the existing class, further developing
the application and allowing users to achieve increased performance. This time saving feature
optimizes code, helps in gaining secured applications and facilitates easier maintenance on the
application.

1.2HARDWARE AND SOFTWARE REQUIREMENTS

HARDWARE REQUIREMENTS

Processor : Pentium I 2GHz and Above


RAM : 512 MB and above
Monitor : 15” Color Monitor
Keyboard
Mouse

SOFTWARE REQUIREMENTS

Operating System. : Windows XP


Developing Tool : Turbo c++

1.3PHASES IN DEVELOPMENT OF SOFTWARE

Library Management System (CSE 4th sem)


Software engineers have been trying various tools, methods and procedures To control the process
of software development in order to build high quality software with high productivity. This
method provides “how to “s” For building the software while the tools provide automated or semi-
automated support for the methods. They are used in all stages of software Developments process,
namely planning, analysis, design, development and maintenance. The software development
procedure integrates the methods And tools together and enables rational and timely development
of the software system.

This shown in figure below: -


Software Development

Procedures
Methods
Tools

They provide the guidelines as how to apply these methods and tools, how to produce the
deliverables at each stage, what controls to apply, and what milestones to uses to assess the
progress. There exist a number of software
Development paradigms, each particular paradigm depends on the nature of the application, the
programming language used, and the controls and the deliverables required. The development
of such successful system depends not only on the use of applicable methods and techniques
but also the developer’s commitment to the objective of the system.
A successful system must: -
1. Satisfy the user requirements.
2. Be easy to understand by user and operator.
3. Be easy to operate.
4. Have a good user interface.

1.4Software Life Cycle Model

Library Management System (CSE 4th sem)


The Series of stages depicting the various tasks involved in development process is called Software
Life Cycle Model. The model implemented by us
Is Waterfall Model, which is most widely used in procedure-oriented development. This model
attempts to break up the identifiable activities into series of actions, each of which must be
completed before the next begins. The activities include problem definition, requirement analysis,
design, and coding, testing, maintenance. Further requirements to this model include iteration back
to previous stages in order to incorporate any changes or missing links.
The phrases and the outputs of the waterfall at each phase are summarized below in tabular format.

Problem
definition

Analysis

Design

Coding

Testing

Maintenance

2
Library Management System (CSE 4th sem)
PLANNING
PLANNING

2.1PROBLEM DESCRIPTION

1. Problem description-: This activity requires a precise definition of the problem in


user terms. A clear statement of the problem is crucial
To the success of the software. It helps not only the developer but also to understand the
problem better. This phase is also called the feasibility study phase because here the
developer checks whether the problem he asked to solve is available in terms of
programming constructs or not. In this phase the following factors are taken care o
automated f:-
• Is the problem solvable?
• What are the various strategies that can be used to solve the problem?
• Which is the best strategy out of chosen one?

Initially the work began with the study of the existing system.
Existing System:
The department of any institution looks up after the entire financial network
Which is the essence in running of an enterprise. The department looks up after the various heads
under which expenses have to be incurred and also the various heads under which the payments

have to be collected. The efficient management of finances ensures profits and hence leads to
prosperity. Thus an efficient department of any institution is the backbone
Of success. This system (before computerization) comprised of manual handling of a range of
components of the department. The reports traveled
From staff down in the hierarchy to the upper levels. This involved redundantly copying the data
for personal record maintenance and then the higher authorities maintain the data in the cashbook.
At the end of the day the record are finalized in the cashbook.

2.2SYSTEM STUDY

EXISTING SYSTEM

Library Management System (CSE 4th sem)


In the existing system all the records of passengers, flight information etc. are handled manually as
a result the passengers have to wait for hours in queue before their reservations are made. Handling
records manually is time consuming and may also result in poor services provided by the airline. It
is very difficult to maintain records of each passenger as a lot of paper work is required, and some
times the records may also get misplaced. There can also be redundancy of data i.e. duplications of
data stored. There is lack of reliability, accuracy and timely information. Often information is not
in accordance with other details i.e. lack of data integrity. As a result the passengers may shift to
some other airline which provides better, quick and accurate services.
The study of system concepts, then, has three basic implications:-
• A system must be designed to achieve a predetermined objective.

• Interrelation and interdependence must exist among the components.


• The objective of the organization as a whole have a higher priority that the objective of its
subsystems. For example, computerizing personnel application must conform to the
organization’s policy on privacy, confidentiality, and security as well as making selected data
available to the accounting division on request.

PROPOSED SYSTEM

Since these days IT sector is growing rapidly and computers are now used in almost every field
hence we have developed software with which Air Ticket Reservation can be made easily and it is
convenient to maintain the records of the passengers.
 This software includes not only making reservation but also cancellation of ticket, making
enquiry about fair, flights etc and also shows the list of passengers for a particular flight.
 We can easily access all the information of a passenger and may alter the records as
needed.
 Maintaining records and providing information about a particular flight becomes very easy
and there is no chance of making mistakes.

This project is mainly designed to help the users in the airlines department to do their work in a
more organized and in a more efficient way. Earlier there was a fear of data loss and data
corruption so this system was developed in keeping view of providing security and more user-
friendly system to the users. Also this system has made the easy availability of the data to the user.
Being a user friendly system the user can get data at any time at the request.

2.3FEASIBILITY STUDY

A feasibility study is a test of a system proposal according to its work-ability, impact on the
organization, ability to meet user needs and effective use of resources. For all new systems, the

Library Management System (CSE 4th sem)


requirement engineering process should start with a feasibility study. The input to the feasibility
study is a set of preliminary requirements; an outline description of the system is intended to
support the process. The result of the feasibility study is a formal proposal. This is simply a report-
a formal document that recommends whether or not it is worth carrying on with the requirements
engineering and system development process.
Feasibility Study is a test of a system proposal according to its workability, impact on the
organization, ability to meet user needs, and effective use of resources. It focuses on three major
questions:
I. What are the user’s demonstrable needs and how does a proposed system meet them?
II. What resources are available for given proposed system? Is the problem worth solving?
III. What are the likely impacts of the proposed system on the organization?
Each of these questions must be answered carefully. They revolve around investigation and
evaluation of the problem, identification and description of proposed systems, specification of
performance and the cost of each system, and final selection of the best system.
The objective of a feasibility study is not to solve the problem but to acquire a sense of its scope.
During the study, the problem definition is crystallized and aspects of the problem to be included
in the system are determined. Consequently, costs and benefits are estimated with greater accuracy
at this stage.
The feasibility study that was conducted for the Air Ticket Reservation System was done keeping
in mind the key considerations that are involved in the feasibility analysis.

Economic Feasibility

This is related to whether the organization can afford the system software and hardware
configuration. The system should not increase the overhead cost rather it should cut down
overhead cost. It also sees whether current manpower is sufficient to run the system and not much
training is required to be given to the employees to run the system. Thus with all these factors we
can conclude that economically the proposed system is feasible.

Operational Feasibility

The organization is facing lot of problems like time consumption, error prone records etc in the
current manual system. The users are willing to work in new environment because ticket
reservation and other processes are done in very short span of time and effectively. Enquiry about
flights and passenger lists can be seen easily and fast, which will enable the employees to work
efficiently and fast. Thus we can conclude that the management and staff are ready to computerize
the system.

Technical Feasibility

For the purpose of development of proposed system the available hardware i.e. Pentium 1
microprocessor, 32 MB RAM, and 1 GB hard disk is sufficient. Where as the software required is

Library Management System (CSE 4th sem)


Windows 95 or above operating system, C++ as front end and FAT File System as back end. Thus
we can say that the proposed system is technical feasible.

Behavioral Feasibility

When a survey was conducted and the staff of the airlines was asked if it was ready to work with
the proposed system, we found a mixed reaction. While some of the employees were more than
willing to work with the new system, there were some who objected to it as they feared that their
job may get into jeopardy. But when it was made clear to them that there jobs are fully secured and
this system will not effect their jobs rather it will ease there work they agreed to work with this
system. Thus this system is behavioral feasible. Thus the proposed system is feasible from all the
aspects that are discussed above and it will work well when installed. It is easy to use and hence it
won’t be necessary to provide any special training to staff members to execute the proposed
system.

3
ANALYSIS
Library Management System (CSE 4th sem)
3.1ANALYSIS

Analysis also known as requirement analysis and specification the main aim of this phase is to
completely understand the requirements of the customer and then to document them properly. This
also covers the detailed study of requirements of both the user and the software.
This activity is basically concerned with that of the system such as:
*What are the inputs to the system?
*What are the processes required.
*What are the outputs expected?
*What are the constraints of the system?

There are two components of the phase, they are-:

A) Requirement Analysis This part of phase requires gathering of entire

Gathering of entire information about the working of the work assigned. If the product involves
developing new software for which no working model exists then the information is
collected through questionnaire, which is filled by the customer, here the customer can
be Conversed with too.

B) System Analysis The output of this part of phrase is an system

Requirement Specification (SRS) document that is presented to the customer and this document is
used as a written agreement between the

Developer and the customer, such that any confusion that arises later can be solved viewing the
norms in the document. Once the customer is

Satisfied with the documented specifications, the SRS can be used for further phases involved in
development of the software.

3.2COMPONENTS OF SRS

Before starting to design a software project, it is extremely important to define the precise
requirements of the customer. However, once the precise
User requirements are identified, analyzed and inconsistencies are weeded out, a document is
written called Software Requirement Specification (SRS).

Library Management System (CSE 4th sem)


1) Functional Requirements

It should discuss the functionalities required from the system. The functional
requirements of the system as documented in the srs should clearly describe each
function which the system would support along with the corresponding input and output
dataset.

2) Nonfunctional requirements

It deals with the characteristics of the system that cannot be expressed as functions. The
nonfunctional requirements may also include the reliability issue, accuracy of results
human computer interface issue, and constraint on system implementation. The
constraints on system implementation describes aspects such as specific data base
management system to be used as per the customer request

3) Goal of implementation

It gives some general suggestion regarding development. These suggestions guide trade
off among design decisions. It might document issues such as revisions to the system
functionality that may be required in future, new device to be supported in the future,
reusability issue, etc.

4
DESIGN

4.1DESIGN

Library Management System (CSE 4th sem)


In this design stage we are designing our project according to cust
o m e r satisfaction or user satisfaction. In this design phase the user must understand the
whole project by seeing the design of the project. After the completion of the analysis stage theuser
must design the project according to the collected requirements in the analysis stage.After the
completion of the analysis stage the user must continue with the design stage.In this project the
user must create the database to store the details of members, books, and reports
tables based upon collection of table requirements collected in thedesign stage.In this
tables, one field has been given as primary key in the design of tables because it
won’t allow the duplicate values of members or it won’t accept the same idnumber for
different members.For Book Details table also one primary key has been allocated for neglecting
thesame values for the field Book number and another table was created that is for
storingthe details of transaction that has been carried out, in that database it doesn’t
have any keys in that because it can contain the details many users can take the book
with sameaccount number.A f t e r c r e a t i o n o f t a b l e s t h e u s e r m u s t d e s i g n t h e
p r o j e c t t h a t i s i t c a n a l s o represent the design in the form of Data Flow Diagrams.
In the Data Flow diagrams itcontains the levels that is it has to be represented in Level 0 DFD,
Level 1 DFD, Level 2DFD,… so that we can represent the Data flow diagrams in that format up to
number of DFD’s required in the project.The user must design or draw the DFD diagrams
based upon the project what itwill do, what are the operations that was carrying in the project
it will represent the DFDdiagrams in the one by one operation that was carrying in the project.The
user must understand the project what are all the operations in the project thatwas going to do or
carrying out by seeing the DFD Diagrams. In that format the user must draw the DFD
diagram. The DFD diagram that must contain all the details of the project.

4.2LEVEL 0 DFD DIAGRAM

In Level 0 DFD diagram, it will display the menus of the project that iswhat are all we can do in
the project. From that we can select the option what we aregoing to do. Based upon the condition it
display the next screen for the selected operation.

Library Management System (CSE 4th sem)


4.3LEVEL 1 DFD DIAGRAM

In Level 1 DFD diagram it takes the input details and store the details inthe database. It takes the
details separately for each table and store details separately ineach table.

Library Management System (CSE 4th sem)


TO STORE THE DETAILS OF MEMBERS:

TO STORE THE DETAILS OF BOOKS

TO STORE THE DETAILS OF TRANSACTIONS

Library Management System (CSE 4th sem)


4.4LEVEL 2 DFD DIAGRAM

Library Management System (CSE 4th sem)


In Level 2 DFD diagram it displays the selected details or the details of all books present in the
library and the details of selected members or all the members whoare having the membership
in the library and the transaction details of members whohave taken books.

TO DISPLAY THE MEMBER DETAILS

TO DISPLAY THE DETAILS OF TRANSACTIONS

Library Management System (CSE 4th sem)


4.5E-R DIAGRAM
Entity-Relationship (E-R) analysis uses three major abstractions to describe data.

Library Management System (CSE 4th sem)


• Entities which specify distinct real world items in an application.
• Relationships which represent meaningful dependencies between the objects.
• Attributes which are the properties of the entities and relationships.
E-R model allows the representation of explicit constrains as well as relationship and is basically
useful in the designs and communication of the logical database model, objects of similar
structures are elected into an entity set.
Although it is relatively easy to describe what an E-R diagram looks like, it is much harder to
describe how one goes about developing an E-R diagram for a particular system. There are some
important points to consider here :How to choose entities, relationships names; and what steps
should be followed in analysis.

5
Library Management System (CSE 4th sem)
IMLEMENTATION
5.1IMLEMENTATION

This chapter deals with implementation of the prototype. Rest of the chapter is organized as

follows. Section presents Testing of the developed system, Section gives the various DFD’s of the

developed system and Section presents the flowchart. Finally Summary of the chapter is given in

section .

5.2TESTING
The aim of the testing process is to identify all the defects existing in a software product. However
for most practical systems even carrying out the testing phase is not possible to guarantee that the
software is error free. This is because of the fact that the input data domain of most of the software
products is large. It is not practical to test the software exhaustively with respect to each of the
value that the input data may assume. We should not underestimate the importance of testing.
Testing is a program consisting of set of test inputs (or test cases) and
observing if the program behaves as expected, then the conditions under which a failure occurs are
noted for debugging and correction.

5.3 LEVELS OF TESTING

Basic levels of testing are: -


- Unit Testing
- Integration Testing

Library Management System (CSE 4th sem)


- System Testing
- Regeneration Testing

Acceptanc
Client
e
needs
System testing
Requirements

Integration
Design testing

Code Unit testing

UNIT TESTING

Each individual form (Module) of the program was tested to ensure that each performs the function
for it was designed. This testing involves the testing of the interface to ensure that the information
flows into and out of the program unit under test. All the independent paths through the control
structures in each module are tested. The testing involves the data validation for each form and the
complete functionality of the form itself. The test cases can be designed in any of the two ways:
• Black-Box Testing
• White-Box Testing
In Mutation testing software is first tested by using an initial testing method. After the initial
testing is complete, mutation testing is taken up. The basic idea is to make a few arbitrary small
changes to the program at the time such as changing a conditional operator or changing the type of
variable. Each time the program is changed, it is a mutant program and the change effected is
called a mutant. A mutant program is tested against the full test suit of the program. If there exists

Library Management System (CSE 4th sem)


at least one test case in the test suit for which a mutant gives an incorrect result, then the mutant is
said to be dead. If a mutant remains alive even after all the test cases have been exhausted, the test
data is enhanced to kill the mutant. The process of generation and killing of mutants can be
automated by predefining a set of primitive changes that can be applied to the program. The major
disadvantage is that it is computationally vary expensive, since a large number of possible mutants
can be generated.

INTEGRATION TESTING

The integration testing was performed on the unit test modules. These modules were combined
into subsystems, which were then tested. The goal was to check whether the integration of the
modules was poor and to detect design errors by focusing on testing the interconnection between
modules. The flow of information from one stage to other was verified and expected results were
checked. The integration plan specifies the steps and the order in which modules are combined to
realize full system. After each integration, partially integrated system was checked. The primary
objective of integration testing is to test the module interfaces. The integration plan can be
developed based on any of the following approaches:
• Big-bang approach
• Top-down approach
• Bottom-up approach
• Mixed approach

SYSTEM TESTING

The entire software system was tested. The goal was to see if the software met its requirements.
Here the validation exercises were carried out to detect application level errors. The functionality

Library Management System (CSE 4th sem)


along with the security, recovery, etc. features of the system is also tested. System tests are
designed to validate a fully developed system with a view of assuming that it meets its
requirements. There are essentially three main types of system testing:
• Alpha testing refers to the system testing that is carried out by the test team with in the
organization
• Beta testing is the system testing performed by a selected group of friendly consumers.
• Acceptance testing is the system testing performed by the consumers to determine
whether or not to accept the delivery of the system.
During system testing, in addition to functional and performance tests, stress tests are performed to
determine the limitations of the system.
Stress testing is also known as endurance testing. Stress tests are black-box tests which are
designed to impose a range of abnormal and even illegal input conditions so as to stress the
capabilities of the software. Stress testing usually involves an element of time or size, such as the
number of records transferred per unit of time, the maximum number of users active at any time,
input data size, etc. Therefore stress testing may not be applicable to many types of systems.

USER ACCEPTANCE TESTING

The users of the system with the inputs of realistic data performed this testing. The only emphasis
in this testing was on the functionality testing, as the users are not aware of the technical aspects of
the system. The testing here was focused on the external behavior of the system , the internal logic
of the system was not emphasized. This testing was also done in controlled environment with
logging of all errors. Based on the errors found in the system, the users accepted the system with
few modifications to the system, in order to rectify the errors.
All these testing are implemented in the various steps at the development of the project.
APPROACHES TO TESTING

There are two fundamental approaches to testing they are: -


1. Functional Testing / black box testing: - In this structure of program is not considered. Test
Cases are solely determined on basis of requirement or specification of the program or
Module.

Library Management System (CSE 4th sem)


2. Structural Testing: - In this text case are generated on the basis of actual code of program or
the module to be tested. This structural approach is called “glass box testing”. This testing is
concern with implementation of the program.

6
CODING

Library Management System (CSE 4th sem)


//***************************************************************
// HEADER FILE USED IN PROJECT
//****************************************************************

#include<fstream.h>
#include<conio.h>
#include<stdio.h>
#include<process.h>
#include<string.h>
#include<iomanip.h>

//***************************************************************
// CLASS USED IN PROJECT
//****************************************************************

class book
{
char bno[6];
char bname[50];
char aname[20];
public:
void create_book()
{
cout<<"\nNEW BOOK ENTRY...\n";
cout<<"\nEnter The book no.";
cin>>bno;
cout<<"\n\nEnter The Name of The Book ";
gets(bname);
cout<<"\n\nEnter The Author's Name ";
gets(aname);
cout<<"\n\n\nBook Created..";
}

void show_book()
{

Library Management System (CSE 4th sem)


cout<<"\nBook no. : "<<bno;
cout<<"\nBook Name : ";
puts(bname);
cout<<"Author Name : ";
puts(aname);
}

void modify_book()
{
cout<<"\nBook no. : "<<bno;
cout<<"\nModify Book Name : ";
gets(bname);
cout<<"\nModify Author's Name of Book : ";
gets(aname);
}

char* retbno()
{
return bno;
}

void report()
{cout<<bno<<setw(30)<<bname<<setw(30)<<aname<<endl;}

}; //class ends here

class student
{
char admno[6];
char name[20];
char stbno[6];
int token;
public:
void create_student()
{
clrscr();
Library Management System (CSE 4th sem)
cout<<"\nNEW STUDENT ENTRY...\n";
cout<<"\nEnter The admission no. ";
cin>>admno;
cout<<"\n\nEnter The Name of The Student ";
gets(name);
token=0;
stbno[0]='/0';
cout<<"\n\nStudent Record Created..";
}

void show_student()
{
cout<<"\nAdmission no. : "<<admno;
cout<<"\nStudent Name : ";
puts(name);
cout<<"\nNo of Book issued : "<<token;
if(token==1)
cout<<"\nBook No "<<stbno;
}

void modify_student()
{
cout<<"\nAdmission no. : "<<admno;
cout<<"\nModify Student Name : ";
gets(name);
}

char* retadmno()
{
return admno;
}

char* retstbno()
{
return stbno;
}

int rettoken()
{
return token;
Library Management System (CSE 4th sem)
}

void addtoken()
{token=1;}

void resettoken()
{token=0;}

void getstbno(char t[])


{
strcpy(stbno,t);
}

void report()
{cout<<"\t"<<admno<<setw(20)<<name<<setw(10)<<token<<endl;}

}; //class ends here

//***************************************************************
// global declaration for stream object, object
//****************************************************************

fstream fp,fp1;
book bk;
student st;

//***************************************************************
// function to write in file
//****************************************************************

void write_book()
{
char ch;
fp.open("book.dat",ios::out|ios::app);
do
{
Library Management System (CSE 4th sem)
clrscr();
bk.create_book();
fp.write((char*)&bk,sizeof(book));
cout<<"\n\nDo you want to add more record..(y/n?)";
cin>>ch;
}while(ch=='y'||ch=='Y');
fp.close();
}

void write_student()
{
char ch;
fp.open("student.dat",ios::out|ios::app);
do
{
st.create_student();
fp.write((char*)&st,sizeof(student));
cout<<"\n\ndo you want to add more record..(y/n?)";
cin>>ch;
}while(ch=='y'||ch=='Y');
fp.close();
}

//***************************************************************
// function to read specific record from file
//****************************************************************

void display_spb(char n[])


{
cout<<"\nBOOK DETAILS\n";
int flag=0;
fp.open("book.dat",ios::in);
while(fp.read((char*)&bk,sizeof(book)))
{
if(strcmpi(bk.retbno(),n)==0)
{
bk.show_book();
flag=1;
Library Management System (CSE 4th sem)
}
}

fp.close();
if(flag==0)
cout<<"\n\nBook does not exist";
getch();
}

void display_sps(char n[])


{
cout<<"\nSTUDENT DETAILS\n";
int flag=0;
fp.open("student.dat",ios::in);
while(fp.read((char*)&st,sizeof(student)))
{
if((strcmpi(st.retadmno(),n)==0))
{
st.show_student();
flag=1;
}
}

fp.close();
if(flag==0)
cout<<"\n\nStudent does not exist";
getch();
}

//***************************************************************
// function to modify record of file
//****************************************************************

void modify_book()
{
char n[6];
int found=0;
clrscr();
Library Management System (CSE 4th sem)
cout<<"\n\n\tMODIFY BOOK REOCORD.... ";
cout<<"\n\n\tEnter The book no. of The book";
cin>>n;
fp.open("book.dat",ios::in|ios::out);
while(fp.read((char*)&bk,sizeof(book)) && found==0)
{
if(strcmpi(bk.retbno(),n)==0)
{
bk.show_book();
cout<<"\nEnter The New Details of book"<<endl;
bk.modify_book();
int pos=-1*sizeof(bk);
fp.seekp(pos,ios::cur);
fp.write((char*)&bk,sizeof(book));
cout<<"\n\n\t Record Updated";
found=1;
}
}

fp.close();
if(found==0)
cout<<"\n\n Record Not Found ";
getch();
}

void modify_student()
{
char n[6];
int found=0;
clrscr();
cout<<"\n\n\tMODIFY STUDENT RECORD... ";
cout<<"\n\n\tEnter The admission no. of The student";
cin>>n;
fp.open("student.dat",ios::in|ios::out);
while(fp.read((char*)&st,sizeof(student)) && found==0)
{
if(strcmpi(st.retadmno(),n)==0)
{
st.show_student();
Library Management System (CSE 4th sem)
cout<<"\nEnter The New Details of student"<<endl;
st.modify_student();
int pos=-1*sizeof(st);
fp.seekp(pos,ios::cur);
fp.write((char*)&st,sizeof(student));
cout<<"\n\n\t Record Updated";
found=1;
}
}

fp.close();
if(found==0)
cout<<"\n\n Record Not Found ";
getch();
}

//***************************************************************
// function to delete record of file
//****************************************************************

void delete_student()
{
char n[6];
int flag=0;
clrscr();
cout<<"\n\n\n\tDELETE STUDENT...";
cout<<"\n\nEnter The admission no. of the Student You Want To Delete : ";
cin>>n;
fp.open("student.dat",ios::in|ios::out);
fstream fp2;
fp2.open("Temp.dat",ios::out);
fp.seekg(0,ios::beg);
while(fp.read((char*)&st,sizeof(student)))
{
if(strcmpi(st.retadmno(),n)!=0)
fp2.write((char*)&st,sizeof(student));
else
flag=1;
}
Library Management System (CSE 4th sem)
fp2.close();
fp.close();
remove("student.dat");
rename("Temp.dat","student.dat");
if(flag==1)
cout<<"\n\n\tRecord Deleted ..";
else
cout<<"\n\nRecord not found";
getch();
}

void delete_book()
{
char n[6];
clrscr();
cout<<"\n\n\n\tDELETE BOOK ...";
cout<<"\n\nEnter The Book no. of the Book You Want To Delete : ";
cin>>n;
fp.open("book.dat",ios::in|ios::out);
fstream fp2;
fp2.open("Temp.dat",ios::out);
fp.seekg(0,ios::beg);
while(fp.read((char*)&bk,sizeof(book)))
{
if(strcmpi(bk.retbno(),n)!=0)
{
fp2.write((char*)&bk,sizeof(book));
}
}

fp2.close();
fp.close();
remove("book.dat");
rename("Temp.dat","book.dat");
cout<<"\n\n\tRecord Deleted ..";
getch();
}

Library Management System (CSE 4th sem)


//***************************************************************
// function to display all students list
//****************************************************************

void display_alls()
{
clrscr();
fp.open("student.dat",ios::in);
if(!fp)
{
cout<<"ERROR!!! FILE COULD NOT BE OPEN ";
getch();
return;
}

cout<<"\n\n\t\tSTUDENT LIST\n\n";

cout<<"=====================================================
=============\n";
cout<<"\tAdmission No."<<setw(10)<<"Name"<<setw(20)<<"Book
Issued\n";

cout<<"=====================================================
=============\n";

while(fp.read((char*)&st,sizeof(student)))
{
st.report();
}

fp.close();
getch();
}

//***************************************************************
// function to display Books list
//****************************************************************
Library Management System (CSE 4th sem)
void display_allb()
{
clrscr();
fp.open("book.dat",ios::in);
if(!fp)
{
cout<<"ERROR!!! FILE COULD NOT BE OPEN ";
getch();
return;
}

cout<<"\n\n\t\tBook LIST\n\n";

cout<<"=====================================================
====================\n";
cout<<"Book Number"<<setw(20)<<"Book
Name"<<setw(25)<<"Author\n";

cout<<"=====================================================
====================\n";

while(fp.read((char*)&bk,sizeof(book)))
{
bk.report();
}
fp.close();
getch();
}

//***************************************************************
// function to issue book
//****************************************************************

void book_issue()
{
char sn[6],bn[6];
int found=0,flag=0;
Library Management System (CSE 4th sem)
clrscr();
cout<<"\n\nBOOK ISSUE ...";
cout<<"\n\n\tEnter The student's admission no.";
cin>>sn;
fp.open("student.dat",ios::in|ios::out);
fp1.open("book.dat",ios::in|ios::out);
while(fp.read((char*)&st,sizeof(student)) && found==0)
{
if(strcmpi(st.retadmno(),sn)==0)
{
found=1;
if(st.rettoken()==0)
{
cout<<"\n\n\tEnter the book no. ";
cin>>bn;
while(fp1.read((char*)&bk,sizeof(book))&& flag==0)
{
if(strcmpi(bk.retbno(),bn)==0)
{
bk.show_book();
flag=1;
st.addtoken();
st.getstbno(bk.retbno());
int pos=-1*sizeof(st);
fp.seekp(pos,ios::cur);
fp.write((char*)&st,sizeof(student));
cout<<"\n\n\t Book issued
successfully\n\nPlease Note: Write the current date
in backside of your book and submit within 15 days fine Rs. 1 for
each day after 15 days period";
}
}
if(flag==0)
cout<<"Book no does not exist";
}
else
cout<<"You have not returned the last book ";

}
}
Library Management System (CSE 4th sem)
if(found==0)
cout<<"Student record not exist...";
getch();
fp.close();
fp1.close();
}

//***************************************************************
// function to deposit book
//****************************************************************

void book_deposit()
{
char sn[6],bn[6];
int found=0,flag=0,day,fine;
clrscr();
cout<<"\n\nBOOK DEPOSIT ...";
cout<<"\n\n\tEnter The student’s admission no.";
cin>>sn;
fp.open("student.dat",ios::in|ios::out);
fp1.open("book.dat",ios::in|ios::out);
while(fp.read((char*)&st,sizeof(student)) && found==0)
{
if(strcmpi(st.retadmno(),sn)==0)
{
found=1;
if(st.rettoken()==1)
{
while(fp1.read((char*)&bk,sizeof(book))&& flag==0)
{
if(strcmpi(bk.retbno(),st.retstbno())==0)
{
bk.show_book();
flag=1;
cout<<"\n\nBook deposited in no. of days";
cin>>day;
if(day>15)
{
fine=(day-15)*1;
cout<<"\n\nFine has to deposited Rs. "<<fine;
Library Management System (CSE 4th sem)
}
st.resettoken();
int pos=-1*sizeof(st);
fp.seekp(pos,ios::cur);
fp.write((char*)&st,sizeof(student));
cout<<"\n\n\t Book deposited successfully";
}
}
if(flag==0)
cout<<"Book no does not exist";
}
else
cout<<"No book is issued..please check!!";
}
}
if(found==0)
cout<<"Student record not exist...";
getch();
fp.close();
fp1.close();
}

//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************

void intro()
{
clrscr();
gotoxy(35,11);
cout<<"LIBRARY";
gotoxy(35,14);
cout<<"MANAGEMENT";
gotoxy(35,17);
cout<<"SYSTEM";
cout<<"\n\nMADE BY : YOUR NAME";
cout<<"\n\nSCHOOL : SCHOOL NAME";
Library Management System (CSE 4th sem)
getch();
}

//***************************************************************
// ADMINISTRATOR MENU FUNCTION
//****************************************************************

void admin_menu()
{
clrscr();
int ch2;
cout<<"\n\n\n\tADMINISTRATOR MENU";
cout<<"\n\n\t1.CREATE STUDENT RECORD";
cout<<"\n\n\t2.DISPLAY ALL STUDENTS RECORD";
cout<<"\n\n\t3.DISPLAY SPECIFIC STUDENT RECORD ";
cout<<"\n\n\t4.MODIFY STUDENT RECORD";
cout<<"\n\n\t5.DELETE STUDENT RECORD";
cout<<"\n\n\t6.CREATE BOOK ";
cout<<"\n\n\t7.DISPLAY ALL BOOKS ";
cout<<"\n\n\t8.DISPLAY SPECIFIC BOOK ";
cout<<"\n\n\t9.MODIFY BOOK ";
cout<<"\n\n\t10.DELETE BOOK ";
cout<<"\n\n\t11.BACK TO MAIN MENU";
cout<<"\n\n\tPlease Enter Your Choice (1-11) ";
cin>>ch2;
switch(ch2)
{
case 1: clrscr();
write_student();break;
case 2: display_alls();break;
case 3:
char num[6];
clrscr();
cout<<"\n\n\tPlease Enter The Admission No. ";
cin>>num;
display_sps(num);
break;
case 4: modify_student();break;
Library Management System (CSE 4th sem)
case 5: delete_student();break;
case 6: clrscr();
write_book();break;
case 7: display_allb();break;
case 8: {
char num[6];
clrscr();
cout<<"\n\n\tPlease Enter The book No. ";
cin>>num;
display_spb(num);
break;
}
case 9: modify_book();break;
case 10: delete_book();break;
case 11: return;
default:cout<<"\a";
}
admin_menu();
}

//***************************************************************
// THE MAIN FUNCTION OF PROGRAM
//****************************************************************

void main()
{
char ch;
intro();
do
{
clrscr();
cout<<"\n\n\n\tMAIN MENU";
cout<<"\n\n\t01. BOOK ISSUE";
cout<<"\n\n\t02. BOOK DEPOSIT";
cout<<"\n\n\t03. ADMINISTRATOR MENU";
cout<<"\n\n\t04. EXIT";
cout<<"\n\n\tPlease Select Your Option (1-4) ";
ch=getche();
Library Management System (CSE 4th sem)
switch(ch)
{
case '1':clrscr();
book_issue();
break;
case '2':book_deposit();
break;
case '3':admin_menu();
break;
case '4':exit(0);
default :cout<<"\a";
}
}while(ch!='4');
}

//***************************************************************
// END OF PROJECT
//***************************************************************

7
Library Management System (CSE 4th sem)
RESULT

The output of this project is shown as:

This is the first page that has been used to show the user and his/her College name.

Library Management System (CSE 4th sem)


This will display the options to what work the user wants to do.

When the user will enter its choice it will be display the related information to the user. The
following are all the outputs of the user’s choice related outputs.

Library Management System (CSE 4th sem)


If the user choose the option edit record then it will be convert into the editing mode

Library Management System (CSE 4th sem)


If user wants to enter the book issued from the library then the list will be shown.

Library Management System (CSE 4th sem)


If the librarian wants to know about a particular student that how many books he\she has been
issued. Then it will display.

Now diplays the message that record has been updated successfully.

Library Management System (CSE 4th sem)


Now, if you have to delete a particular record then it will be ask u the student’s admission no’. If
the admission no’ is correct then the message will be display. “ Record deleted.”

If you have to enter a new book into the library then it also edits a new book by the book no’.

Library Management System (CSE 4th sem)


After that if you want to view all the list of the books present in the library then it can diplay the
names of all the book with the author name.

Library Management System (CSE 4th sem)


If you want to see a particular details of book then it will ask you the book no’.

If you want to change something in a record then it will also ask user the book no’ and by this we
can update the record of the book.

Above message will be shown as in the output.

Library Management System (CSE 4th sem)


8
CONCLUSION AND FUTURE SCOPE

8.1CONCLUSION

After we have completed the project we are sure the problems in the existing system would

overcome. The “LIBRARY MANAGEMENT SYSTEM” process made computerized to reduce

human errors and to increase the efficiency. The main focus of this project is to lessen human

efforts. The navigation control is provided in all the forms to navigate through the large amount of

records. If the numbers of records are very large then user has to just type in the search string and

user gets the results immediately. The editing is also made simpler. The user has to just type in the

required field and update update the desired field.

The Books and Students are given a particular unique id no. 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.

The problems, which existed in the earlier system, have been removed to a large extent. And it is

expected that this project will go a long way in satisfying users requirements. The computerization

of the Library Management will not only improves the efficiency but will also reduce human stress

thereby indirectly improving human recourses.

Library Management System (CSE 4th sem)


8.2FUTURE SCOPE

This application can be easily implemented under various situations. We can add new features as
and when we require. Reusability is possible as and when require in this application. There is
flexibility in all the modules.

SOFTWARE SCOPE

• Extensibility: This software is extendable in ways that its originaldevelopers may not expect.
The following principles enhance sentensibility like hide data structure, avoid traversing multiple
links or methods, avoid case statements on object type and distinguish public and private
operations.

• 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.Scope of this document is to put down the requirements, clearly identifying the
information needed by the user, the source of the information and outputs expected from the
system.

8.3DRAWBACKS

1. It is not secure because their the password is not used.


2. Although enough flexibility is provided to the user while handling the data but in some
cases since strict sequence of operation is followed hence the user doesn’t have flexibility.

9
Library Management System (CSE 4th sem)
REFERENCES AND BIBLIOGRAPHY

9.1REFERENCES

 www.google.com
 www.sourcecodeworld.com
 www.microsoft.com
 www.qsee-technologies.com

9.2BIBLIOGRAPHY

 Object oriented Programming with C++ , Balaguruswamy.


 Programming with C++, D. Ravichandern, Tata Mcgraw Hill 1996..
 The C++ programming language , Bjarne Stroustrup ,Addison Wesley
 Object oriented programming in turbo C++ , Robbet Lofre
 Software engineering – “K.K.Aggarwal & Yogesh Singh”
 Fundamentals of computers –“ V.Rajaraman”
 System Analysis and design- “Igor Hawryszkiewycz”
 Turbo c++ - “Robert Lafore”
 Let us c – “Yashavant Kanetkar”

Library Management System (CSE 4th sem)

You might also like