You are on page 1of 53

LIBRARY MANAGEMENT

PROBLEM STATEMENT: Mohamed Sathak A.J. College of engineering is an affiliated college under the Anna University five different departments and more than 1200 students studying under it. The main aim to develop this software is to manage the operations performed in our library. The basic information about our library is as follows There are five departments with 60 students in each department with a total strength of 1200 students and 150 lectures. There are 8000 books available. The managing services required are
Book management: To maintain the following details

a. Book cost and purchase details. b. Publisher and author details. c. To remove the books details in case it had gone out of use or to add new books name into the document. Student services: a. Each student is given three cards (one book per card). b. The date of books taken and the last date should be documented and upgraded every weak. c. On failure of returning the book on or before the due date will be fined (1Rs per day). d. Students must submit there cards at the beginning of every semester and then only the students account should be activated. Staff services: a. Each student is given three cards (one book per card). b. The date of books taken and the last date should be documented and upgraded every weak. c. On failure of returning the book on or before the due date will be fined (1Rs per day).

SOFTWARE REQUIREMENTS SPECITFICATION


1. INTRODUCTION :
1.1. Purpose: The main purpose of the specification is to guide the developer about the book and the account structure, students and staff services, requirements and the input and output feature. 1.2. Scope: The LIBRARY MANAGEMENT SYSTEM software has the ability to display the details of the books available in various departments, the transactions of books and about the book holders. It enables online reservation of books. It also enables a fully automated library service, which makes the word easier and systematic. BENEFITS: Saves time. Reduces the manual work. Makes the searching work easier. OBJECTIVES: Fully automated library service. Efficient working of the library. 1.3. Definitions, Acronyms and abbreviation: LAN- Local Area Network. GUI- Graphical User Network OS Operating System. RAM Random Access Memory ORB-Online Reservation of books HDD- Hard Disc Drive LMS- Library Management System 1.4. References: The books and materials referred during the pre-development stages of the project include: Software Engineering- by Roger S. Pressman Software Engineering- by James Peters Software Engineering- by Ian Somerville

1.5. Overview: Section I gives a brief introduction about the document and the objectives of the software. The overall description such as system interface, software interface, hardware interface, communication interface are discussed in section II and the software product featured section III. 2. OVERALL DESCRIPTION: 2.1. PRODUCT PERSPECTIVE: The product works on a stand alone system. Thus it is independent. It must be able to run on a LAN of any number of client system under the control of the server. 2.1.1. System Interfaces: The client systems should be able to share the data available in the database among the network connections. 2.1.2: User Interfaces: The screen format is in the menu type which contains submenus which is used for the interaction with the user. This menu type screen format allows the user to choose his option. This type of format will make the user to operate easily. 2.1.3: Hardware interfaces: The Keyboard and the Printer Barcode reader Ethernet Card 2.1.4: Software Interfaces: NAME MS-Access OS Windows VERSION SOURCE 200 or any higher version Microsoft Corporation XP or 98 or any higher Microsoft Corporation version

2.1.5: Communication Interfaces: Systems are interconnected by a LAN connection. The librarian and administrators can access it. The LAN has the ability to access his library accounts from any system within the library. 2.1.6: Memory Constrains: The system would require a disc space of 20 GB and a 256 MB space RAM for the service system and 40 GB HDD and a 64 MB RAM for client systems. 2.1.7: Operations: The user will be able to take the book through online reservation system in the website www.mdsathakcollege.org. The user should get the book from the library on showing his library card. The user will be able to know his fine amount through this website. The reservation is done based on the first come first serve bases. There must also be a back up of the data, which will enable easy recovery from failures that maybe catastrophic at system oriented. 2.1.8: Site Adaptation Requirements: The software requires no special modifications to adapt to particular installations except for the files that are required to be recreated. 2.2. PRODUCT FUNCTIONS: The major function includes: Providing details about the books available in library according to their department and author wise for searching purpose. Giving details about fine and their time of returning the books. Provide facility of online registration of books. Providing facility of online registration of books. Updating of books by the librarian according to the understandable order. Providing the book transaction such as borrowing, renewal, retrieval of books in an easier manner.

2.3 USER CHARACTERISTICS: It is sufficient that the users have a basic knowledge needed for operating the software product. There is no need for any experience or technical knowledge. 2.4. CONSTRAINTS: Regularity policies: It is mandatory that no text box must be left empty or contains insufficient data. Hardware limitations: There must be a 64 MB on-board memory. Control Functions: Incase of any errors and service problems, proper error handling and data recovery mechanism must be included. Parallel Operations: It must support many users simultaneously. Language Requirements: Visual basic. Reliability Requirements: Data redundancy and use of special/blank characters must be avoided. Safety/Security Considerations: The application must be exited always normally. 2.5. ASSUMPTIONS AND DEPENDENCIES The user requiring the library services must be a member of the library. The required input files must be present. The details entered about the books and the cardholders must be a valid one. 2.6. APPORTIONING OF REQUIREMENTS: Not applicable.

3. SPECIFIC REQUIREMENTS:
3.1. EXTERNAL INTERFACE REQUIREMENTS: 3.1.1. User interfaces: The interface used is graphical user interface (GUI) and the interface must be easy to understand. This interface services as a bridge between the user and the software. It also makes the user interaction with the system easy. The details about the students and staffs must be filled during online reservation. The user interface includes: 3.1.1.1. Screen formats/organisation: The introductory screen will be the first to be displayed which will allow the users to choose either of the one option like viewing the details of the books they are holding and searching the books, updating the new books on online registration. 3.1.1.2. Windows format/organisation: When the user chooses some other option then the information pertaining to that choice will be displayed in a new window, which ensures multiple windows to be visible on the screen and the users can switch between them. 3.1.1.3. Data format: The data entered by the users will be alphanumeric. 3.1.1.4. End message: When there are some expectations raising error like entering invalid details, the n error messages will be displayed prompting the users to re-enter the details. When an event has taken place successfully like the searching of books, then a message Book Available will be displayed to the user at the end.

3.1.2. Hardware Interfaces: The system must basically support certain input and output devices. Their descriptions are as follows: Name of the item Bar Code Reader Printer Description of purpose Source of input or destination of output To check the validity of the library Source of input card To print the list of selected books and Destination of output reports regarding the books taken

3.1.3: Software Interfaces: The operating system used in Windows XP and the database used in MS-Access. 3.1.4. Communication Interfaces: Every client system connected via LAN establishes a communication only with the server and not with any other client system. 10 to 20 systems are connected using LAN of 10 Mbps is used.

3.2. SOFTWARE PRODUCT FEATURES: 3.2.1. FEATURE 1: ISSUING IDS TO MEMBERS: This is the feature provided to all the members of library. 3.2.1.1. Purpose: Each login of the user will have the entire database of books. Only the librarian has special privilege to modify the database. This is a feature in order to access the individuals details regarding his current book status. 3.2.1.2. Stimulus/Response: By providing IDs to the users the details like the date of returning already taken books, the fine money etc can be identified for the particular user. 3.2.1.3. Associated Functional Requirements: Once the user clicks the respective feature in the stain, he should be taken to the appropriate section enabling them to view the college details. 3.2.1.3.1.1. Introduction: The user must be provided with the requested information within 10seconds. 3.2.1.3.1.2. Inputs: The user will choose appropriate options out of the options available, namely viewing college details and applying for admissions. 3.2.1.3.1.3. Processing: Recognizing the correct option chosen by the browser. 3.2.1.3.1.4. Outputs: The pages corresponding to the chosen features will be displayed.

3.2.2. FEATURE 2: CREATING MEMBERSHIP NUMBER: At the starting of the year a membership number will be issued to each and every student or staff of this software. 3.2.2.1. Purpose: The purpose of issuing a membership number is to increase security and to make sure that access is given only to the staff or the students. 3.2.2.2. Stimulus/Response: Once the request is made a window will appear asking for all personal details of the staff/student so as to issue a membership number. 3.2.2.3. Associated Functional Requirements: 3.2.2.3.1. Functional Requirements- Creating membership number: It must check that the user enters valid personal details and display error messages to avoid abnormal interrupt. 3.2.2.3.1.1. Introduction The membership number will be issued based on precise input details entered by user. 3.2.2.3.1.2. Inputs The user must enter input details like name of the staff or student, roll number, department etc. 3.2.2.3.1.3. Processing It will be checked whether the entered input is valid or not and will create a membership for the staff/student. 3.2.2.3.1.4. Outputs: The issued number should be displayed to the user.

3.2.3. FEATURE 3: UPDATING OF BOOKS IN THE LIBRARY: The ability of the software to provide easy entering of the books in the library. 3.2.3.1. Purpose: The purpose of this software is to enable the library staff members to enter the book in an easy manner. 3.2.3.2. Stimulus/Response: Once the user chooses the particular option, the web pages corresponding to that are to be displayed on the screen. 3.2.3.3. Associated Functional Requirements 3.2.3.3.1.Functional Requirements- Updating of books in the library: Once the user clicks the respective feature they should be taken to the appropriate section enabling them to enter the code, author name, title of the book and the publisher of the corresponding book. 3.2.3.3.1.1. Introduction: The user must be provided with the requested information within 12seconds. 3.2.3.3.1.2. Inputs: The user should give the code, title of the book, author name and the publisher of the book. 3.2.3.3.1.3. Processing: Recognising the correct option chosen by the user in the browser. 3.2.3.3.1.4. Outputs: The outputs will be displaying to the user the pages corresponding to the chosen feature.

3.2.4. FEATURE 4: TRANSACTION OF BOOKS: 3.2.4.1. Purpose: The purpose is to enable the user to lend a book when certain conditions are satisfied like amount of fine for the last book has been paid or not, valid membership has been entered etc. 3.2.4.2. Stimulus/Response: When the user requests for lending the book, screen prompting the user to enter details about the membership number etc. 3.2.4.3. Associated Functional Requirements: 3.2.4.3.1.Functional Requirements-Lending of books: If invalid membership number of registration number has been entered, it must handle this error and ask the user to enter the proper input. 3.2.4.3.1.1. Introduction: The user must be provided with the requested information namely the ID and the number of books needed. 3.2.4.1.2. Inputs: The inputs given are the number of books and the ID of the student. 3.2.4.3.1.3. Processing: Recognising of the correct option chosen by the user in the browser, it reduces the number of copy in the file. 3.2.4.3.1.4. Outputs: Display a message confirming which books the user has taken.

3.2.5. FEATURE 5: RESERVING OF BOOKS:

The software must allow the user to reserve for a particular book. 3.2.5.1. Purpose: The purpose is to allow the applicants to reserve the books, when certain conditions are satisfied. 3.2.5.2. Stimulus/Response: Once the user requests for the particular books, it must be displayed on the screen prompting the user to fill the details about his roll number, card number etc. 3.2.5.3. Associated Functional Requirements 3.2.5.3.1.Functional Requirements- Reserving of books: If any one of the details provided by the user does not meet the defined parameters then it would notify the person by displaying error message. 3.2.5.3.1.1. Introduction: If the register number entered is valid, then it will ask details about the book which the user has requested to reserve. 3.2.5.3.1.2. Inputs: The user must enter input details like membership number, title and the author name of the book to reserved. 3.2.5.3.1.3. Processing: Processing will be done to check whether the entered detail is valid or not and whether the requested book is available for reservation. 3.2.5.3.1.4. Outputs: A message must be displayed confirming which book has been reserved for the user.

3.2.6. FEATURE 6:CALCULATION OF FINE AMOUNT WHILE RETURNING THE BOOK: If the user wants to reserve or renew a book then the software must first check if any pending book has to be returned and whether the fine has been paid. 3.2.6.1. Purpose: The purpose of this is to enable the students or staff to view the amount of fine to be paid and last date to return a book. 3.2.6.2. Stimulus/Response: The user will be asked to enter membership number and the software will check if any fine has to be paid. 3.2.6.3. Associated Functional Requirements 3.2.6.3.1.Functional Requirements- Calculation of fine: Proper error messages must be displayed if invalid input is entered. 3.2.6.3.1.1. Introduction: The user can check the last date of return or whether the fine has been paid depending on returning process can be carried out. 3.2.6.3.1.2. Inputs: The user must enter input details like membership number, title and author of the book to be reserved. 3.2.6.3.1.3. Processing: The software will check whether a particular member has reserved a book or not. 3.2.6.3.1.4. Outputs: It will display the last date for returning the book and the amount of fine due.

3.2.7. FEATURE 7: SEARCHING FOR A BOOK: The software must be able to search and give details for a specified book on users request. 3.2.7.1. Purpose: The purpose of this is to enable the users to search for a required book even if the user is not able to provide information about the book. 3.2.7.2. Stimulus/Response: Once the user chooses this option , he is asked to enter the title and name of the author of the book to be searched. 3.2.7.3. Associated Functional Requirements 3.2.7.3.1.Functional Requirements- Searching by Authors name: It must also be able to handle invalid inputs and search for the exact book. 3.2.7.3.1.1. Introduction: The user must be asked to enter the title and author of the required book upon which the specified book can be searched. 3.2.7.3.1.2. Inputs: The user can search for a book by giving the title and author name of the book. 3.2.7.3.1.3. Processing: The software must provide details of all books given a particular title of the book and author name and display information on all books related to the title of the book and name of the author. 3.2.7.3.1.4. Outputs: All the books with the given title and author name are displayed. And also the information about where it can be found is displayed.

3.3. PERFORMANCE REQUIREMENTS : At ay instant, a maximum of four nodes or users will be given access simultaneously. Since the program handles multiple users, if more than one person attempts to save data to the file stored in database, the program will lock the data file using a two phase commit protocol to prevent simultaneous access. 3.4. DESIGN CONSTRAINS: Requires 256 MB on-board memory. Based completely on windows functionality platform. The Software should be portable and must be inaccessible to unauthorized users. 3.5. SOFTWARE SYSTEM ATTRIBUTES: 3.5.1. Reliability: The factors needed to establish the softwares expected reliability are : The user inputs should be valid and within the given range. Normal termination of the program. 3.5.2. Availability: The factors that guarantee the softwares availability include proper termination and correct input details. Also the resources used for the project development is Microsoft Certified, which speaks of its high quality standards. 3.5.3. Security: It must be ensured that access will be provided to the authorized persons via users ID. Network security will be provided by the use of firewalls. Checks can be performed at regular intervals to ensure data integrity.

3.5.4. Maintainability: Implementing the concept of modularity, which in turn reduced the complexity involved in maintaining it, will develop the software. The administrator should have a sound technical knowledge about maintaining the software. 3.5.5. Portability: The application is very adaptable, it can be used in different computer systems with different operating systems and folders. 3.6. LOGICAL DATABASE REQUIREMENTS : The system requires the use of text file to maintain the student and staff details about which book has been reserved and the amount of fine.

4. INDEX:
NIL

5. APPENDICES:
NIL

DATA FLOW DIAGRAM: LEVEL 0: Input files Library manageme nt System Display

Librarian

Member operations

Book operations LEVEL 1(a):

User

Input files

Accept the details

Member Database

Write in the file

Book details

LEVEL 1(b):

Add new member Member Operatio ns Issue duplicate ID card

Member database

User

Renew existing member Transaction database

LEVEL 1(c): Add new book Book operation s Book database

User

Issue book

Transaction database

Return book

LEVEL 2: Read member details

Customer database User Displa y

Read book details Transaction database Read transaction details

FUNCTIONAL POINT ANALYSIS

Library management system


Function oriented software metrics measure of the functionality delivered by the application as a normalization value. Function oriented metrics were first proposed by Albrecht [ALB79], who suggested a measure called the function point. Function points are derived using an empirical relationship based on countable [direct] measures of softwares information domain and assessments of software complexity. Formula FP=count total*[0.65+ (0.01* Fi)] Function point count for Library Management Fi F1 General System characteristics General system Adjustment factor Characteristics Data communications How many communication facilities are there to aid in the transfer or exchange of information with the application Distributed data How are distributed data and Processing processing functions handled? Performance Did the user require response time or throughput? Heavily used How heavily used is the current Configuration hardware platform where the application will be executed? Transaction rate On line data entry End user efficiency On line update How frequently is transactions executed daily, weekly, monthly, etc.? What percentage of the information is entered online? Was the application designed for end user efficiency? How many ILFs are updated by online transaction? Value 2

F2 F3 F4

2 3 2

F5 F6 F7 F8

3 0 1 0

F9

Complex processing

F10 Reusability F11 Installation ease F12 Operational ease F13 Multiple sites

F14 Facilitate change

Does the application have extensive logical or mathematical processing? Was the application developed to meet one or many users needs? How difficult is conversion and installation? How effective and/or automated are start up, back up and recovery procedures? Was the application specifically designed, developed and supported to install at multiple sites for multiple organizations? Was the application specifically designed, developed and supported to facilitate change? TOTAL

3 4 3 3 0

3 29

Type of components External inputs External outputs External inquiries External logical files External interface files

Unadjusted function point Complexity of components 5*3 4*4 3*3 1*7 3*5 Total

Value 15 16 9 7 15 62

Formula FP = count total*[0.65+ (0.01*Fi)]

= 62*[0.65+ (0.01*29)] = 58.28 Function point count for Library Management System= 58.28 Lines of code=58.28*33=1824=1.8 KLOC Code developed in C Estimation of effort using Cocomo Model: a=3.2; b=1.05 Effort =a*(KLOC) b =3.2*(1.8)1.05 =5.9 person-month Estimation of time using Cocomo Model: Type of Project = Organic. Then, c=2.5; d=0.38 Time = (Effort) d * c = (5.9) 0.38 * 2.5 = 4.9 months Estimation of Cost using Cocomo Model: Cost = 4.9 * 3000 = Rs. 14752

PROGRAM
#include<iostream.h> #include<conio.h>

#include<stdio.h> #include<string.h> #include<fstream.h> #include<process.h> FILE *m; FILE *b; FILE *t; int ID=0; struct member { int mid; char mname[20],madd[30]; struct msince { int day,mon,year; }ms; struct mexpir { int day,mon,year; }me; int inputmember(); }M; struct book { struct bkid { int gno,bno,no; }bk; char bname[20],author[20],pub[20]; int price; int inputbook(); }B; struct transaction { int mid,tid; struct bookid

{ int gno,bno,no; }bk; struct issued { int day,mon,year; }i; struct returned { int day,mon,year; }r; int fine; char reason; }T; int checkmem(int idno); void inputmember(); int checkbook(int gno,int bno,int no); void inputbook(); void input(); void member(); void memscr(); void addmem(); void renewmem(); void issdupp(); void book(); void bookscr(); void addbook(); void issbook(); void retbook(); void display(); void displayscr(); void memdis(); void bookdis(); void trandis(); void mainscr(); void line(); void main() { int opt; clrscr();

while(1) { mainscr(); printf("\nEnter your option:"); scanf("%d",&opt); switch(opt) { case 1: input(); break; case 2: member(); break; case 3: book(); break; case 4: display(); break; case 5: exit(0); default: printf("Not a valid option"); fflush(stdin); getchar(); break; } } } void line() { printf("\n"); for(int i=0;i<80;i++) printf("-"); printf("\n"); }

int checkmem(int idno) { fseek(m,0,0); while(fread(&M,sizeof(M),1,m)!='\0')

{ if(M.mid==idno) return 1; } return 0; } int checkbook(int gno,int bno,int no) { fseek(b,0,0); while(fread(&B,sizeof(B),1,b)!='\0') { if((B.bk.gno==gno)&&(B.bk.bno==bno)&& (B.bk.no==no)) return 1; } return 0; } void inputmember() { int i=M.inputmember(); while(i) { if (i==-1) { i=M.inputmember(); continue; } fwrite(&M,sizeof(M),1,m); i=M.inputmember(); } }

int member::inputmember() { int j,id; long int i; j=0;

printf("\nEnter the details of the member"); printf("\n\tID number :"); scanf("%d",&id); i=ftell(m); j=checkmem(id); mid=id; if((mid!=0)&&(!j)) { fseek(m,i,0); printf("\n\tName :"); scanf("%s",&mname); printf("\n\tAddress :"); scanf("%s",&madd); printf("\n\tMember since:"); printf("\n\t\tDay :"); scanf("%d",&ms.day); printf("\n\t\tMonth :"); scanf("%d",&ms.mon); printf("\n\t\tYear :"); scanf("%d",&ms.year); printf("\n\tExpiration :"); printf("\n\t\tDay :"); scanf("%d",&me.day); printf("\n\t\tMonth :"); scanf("%d",&me.mon); printf("\n\t\tYear :"); scanf("%d",&me.year); return 1; } if(j) { printf("\nThe member ID already exist"); fflush(stdin); getchar(); return -1; } return 0; } int book::inputbook() { int j,gno,bno,no;

long int i; j=0; printf("\nEnter the details of the book"); printf("\n\tBook ID :"); printf("\n\t\t Gno :"); scanf("%d",&gno); printf("\n\t\tBno :"); scanf("%d",&bno); printf("\n\t\tNo :"); scanf("%d",&no); i=ftell(b); j=checkbook(gno,bno,no); bk.bno=bno; bk.gno=gno; bk.no=no; if(((bk.gno!=0)||(bk.bno!=0)||(bk.no!=0))&&(!j)) { fseek(b,i,0); printf("\n\tName :"); scanf("%s",&bname); printf("\n\tAuthor :"); scanf("%s",&author); printf("\n\tPublisher :"); scanf("%s",&pub); printf("\n\tPrice _ :"); scanf("%d",&price); return 1; } if(j) { printf("The book id already Exists"); fflush(stdin); getchar(); return -1; } return 0; } void inputbook() { int i=B.inputbook();

while(i) { if(i==-1) { i=B.inputbook(); continue; } fwrite(&B,sizeof(B),1,b); i=B.inputbook(); } } void input() { clrscr(); m=fopen("Z:\\member.txt","r+"); b=fopen("Z:\\book.txt","r+"); T.tid=0; inputmember(); inputbook(); fclose(m); fclose(b); fclose(t); getchar(); } void member() { int opt; while(1) { memscr(); m=fopen("Z:\\member.txt","r+"); t=fopen("Z:\\trans.txt","r+"); printf("\n\tEnter your option:"); scanf("%d",&opt); switch(opt) { case 1:

addmem();

case 2: case 3: case 4: default:

break; renewmem(); break; issdupp(); break; fclose(m); fclose(t); return; printf("Not a valid option"); fflush(stdin); getchar(); break;

} fclose(m); fclose(t); } } void memscr() { clrscr(); gotoxy(16,1); printf("LIBRARY MANAGEMENT SYSTEM\n"); gotoxy(12,2); printf("MEMBER\n"); gotoxy(8,3); printf("1:Add New Member"); gotoxy(8,4); printf("2:Renew Existing Member"); gotoxy(8,5); printf("3:Issue Duplicate I-Card"); gotoxy(8,6); printf("4:Back"); }

void addmem() { if(M.inputmember()==1)

{ fseek(t,0,2); fseek(m,0,2); fwrite(&M,sizeof(M),1,m); T.tid=++ID; T.mid=M.mid; T.reason='A'; T.fine=500; T.i.day=T.i.mon=T.i.year=0; T.r.day=T.r.mon=T.r.year=0; T.bk.bno=T.bk.no=T.bk.no=0; fwrite(&T,sizeof(T),1,t); } } void renewmem() { int id; char ch; printf("\nEnter the Membership id:"); scanf("%d",&id); if(checkmem(id)) { T.tid=++ID; T.fine=300; T.reason='E'; T.mid=id; T.i.day=T.i.mon=T.i.year=0; T.r.day=T.r.mon=T.r.year=0; T.bk.bno=T.bk.no=T.bk.no=0; fseek(t,0,2); fwrite(&T,sizeof(T),1,t); printf("\nMember renewed....."); getchar(); } else {

printf("\nThe ID number does not exist do you want to add a new member(y/n):"); ch=getch(); if(ch=='y') addmem(); getchar(); } } void issdupp() { int id; printf("\nEnter the Membership id:"); scanf("%d",&id); if(checkmem(id)) { T.i.day=T.i.mon=T.i.year=0; T.r.day=T.r.mon=T.r.year=0; T.bk.bno=T.bk.no=T.bk.no=0; T.tid=++ID; T.fine=50; T.reason='D'; T.mid=id; fseek(t,0,2); fwrite(&T,sizeof(T),1,t); printf("\nDuplicte id issued....."); getchar(); } else printf("\nThe ID number does not exist"); }

void book() {

int opt; while(1) { bookscr(); b=fopen("Z:\\book.txt","r+"); t=fopen("Z:\\trans.txt","a+"); printf("\n\tEnter your option:"); scanf("%d",&opt); switch(opt) { case 1: addbook(); break; case 2: issbook(); break; case 3: retbook(); break; case 4: fclose(b); fclose(t); return; default: printf("Not a valid option"); fflush(stdin); getchar(); break; } fclose(b); fclose(t); } } void bookscr() { clrscr(); gotoxy(16,1); printf("LIBRARY MANAGEMENT SYSTEM\n"); gotoxy(12,2); printf("BOOK\n"); gotoxy(8,3); printf("1:Add New Books"); gotoxy(8,4); printf("2:Issue Book");

gotoxy(8,5); printf("3:Return Book"); gotoxy(8,6); printf("4:Back"); } void addbook() { if(B.inputbook()==1) { fseek(b,0,2); fwrite(&B,sizeof(B),1,b); } } void display() { int opt; while(1) { displayscr(); printf("\n\tEnter your option:"); scanf("%d",&opt); switch(opt) { case 1: memdis(); break; case 2: bookdis(); break; case 3: trandis(); break; case 4: fclose(t); return; default: printf("Not a valid option"); fflush(stdin); getchar(); break; } fclose(t); }

} void issbook() { int bno,no,gno,id; printf("\nEnter Book id:"); printf("\n\tgno :"); scanf("%d",&gno); printf("\n\tbno :"); scanf("%d",&bno); printf("\n\tno :"); scanf("%d",&no); if(checkbook(gno,bno,no)) { printf("\nEnter Membership id :"); scanf("%d",&id); m=fopen("Z:\\member.txt","r+"); if(checkmem(id)) { T.tid=++ID; T.mid=M.mid; T.bk.gno=gno; T.bk.bno=bno; T.bk.no=no; printf("\nISSUE DATE:"); printf("\n\tDay\t\t:"); scanf("%d",&T.i.day); printf("\n\tMonth\t\t:"); scanf("%d",&T.i.mon); printf("\n\tYear:\t\t:"); scanf("%d",&T.i.year); printf("\nRETURN DATE:"); printf("\n\tDay\t\t:"); scanf("%d",&T.r.day); printf("\n\tReturn\t\t:"); scanf("%d",&T.r.mon); printf("\n\tYear:\t\t:"); scanf("%d",&T.r.year); T.fine=0.0; T.reason='I';

fseek(t,0,2); printf("\n\tBOOK ISSUED"); fflush(stdin); getchar(); fwrite(&T,sizeof(T),1,t); } else { fflush(stdin); printf("\nMember ID not found"); getchar(); } fclose(m); } else { fflush(stdin); printf("\nBook not found"); getchar(); } } void retbook() { int bno,no,gno,id; printf("\nEnter Book id:"); printf("\n\tgno :"); scanf("%d",&gno); printf("\n\tbno :"); scanf("%d",&bno); printf("\n\tno :"); scanf("%d",&no); if(checkbook(gno,bno,no)) { printf("\nEnter Membership id :"); scanf("%d",&id); m=fopen("Z:\\member.txt","r+"); if(checkmem(id)) { T.tid=++ID;

T.mid=M.mid; T.bk.gno=gno; T.bk.bno=bno; T.bk.no=no; printf("\nISSUE DATE:"); printf("\n\tDay\t\t:"); scanf("%d",&T.i.day); printf("\n\tMonth\t\t:"); scanf("%d",&T.i.mon); printf("\n\tYear:\t\t:"); scanf("%d",&T.i.year); printf("\nRETURN DATE:"); printf("\n\tDay\t\t:"); scanf("%d",&T.r.day); printf("\n\tReturn\t\t:"); scanf("%d",&T.r.mon); printf("\n\tYear:\t\t:"); scanf("%d",&T.r.year); T.fine=10; T.reason='R'; fseek(t,0,2); printf("\n\tBOOK RETURNED:"); fflush(stdin); getchar(); fwrite(&T,sizeof(T),1,t); } else { fflush(stdin); printf("\nMember ID not found"); getchar(); } fclose(m); } else { fflush(stdin); printf("\nBook not found"); getchar(); }

} void displayscr() { clrscr(); gotoxy(16,1); printf("LIBRARY MANAGEMENT SYSTEM\n"); gotoxy(12,2); printf("DISPLAY\n"); gotoxy(8,3); printf("1:Member Details"); gotoxy(8,4); printf("2:Book Details"); gotoxy(8,5); printf("3:Transaction Details"); gotoxy(8,6); printf("4:Back"); } void memdis() { clrscr(); int x=9; m=fopen("Z:\\member.txt","r+"); line(); gotoxy(25,4); printf("Details of the member"); line(); fseek(m,0,0); gotoxy(2,6); printf("Member ID"); gotoxy(15,6); printf("Name"); gotoxy(25,6); printf("Address"); gotoxy(49,6); printf("Member since"); gotoxy(62,6); printf("Expiration"); line();

while(fread(&M,sizeof(M),1,m)!='\0') { gotoxy(7,x); printf("%d",M.mid); gotoxy(12,x); printf("%s",M.mname); gotoxy(23,x); printf("%s",M.madd); gotoxy(51,x); printf("%d/%d/%d",M.ms.day,M.ms.mon,M.ms.year); gotoxy(64,x); printf("%d/%d/%d",M.me.day,M.me.mon,M.me.year); x+=2; } line(); fclose(m); fflush(stdin); getchar(); } void bookdis() { clrscr(); int x=9; b=fopen("Z:\\book.txt","r+"); line(); gotoxy(25,4); printf("Details of the book"); line(); fseek(b,0,0); gotoxy(2,6); printf("Book ID"); gotoxy(13,6); printf("Book Name"); gotoxy(28,6); printf("Author Name"); gotoxy(48,6);

printf("Publisher Name"); gotoxy(70,6); printf("Price"); line(); while(fread(&B,sizeof(B),1,b)!='\0') { gotoxy(3,x); printf("%d/%d/%d",B.bk.gno,B.bk.bno,B.bk.no); gotoxy(13,x); printf("%s",B.bname); gotoxy(28,x); printf("%s",B.author); gotoxy(48,x); printf("%s",B.pub); gotoxy(72,x); printf("%d",B.price); x+=2; } line(); fclose(b); fflush(stdin); getchar(); } void trandis() { clrscr(); int x=9; t=fopen("Z:\\trans.txt","r+"); line(); gotoxy(25,4); printf("Details of the transactions"); line(); fseek(t,0,0); gotoxy(2,6); printf("Trans ID"); gotoxy(12,6); printf("Member ID"); gotoxy(22,6); printf("Book ID");

gotoxy(30,6); printf("Issued date"); gotoxy(45,6); printf("Return date"); gotoxy(60,6); printf("Fine"); gotoxy(70,6); printf("Reason"); line(); fseek(t,0,0); while(fread(&T,sizeof(T),1,t)!='\0') { gotoxy(2,x); printf("%d",T.tid); gotoxy(12,x); printf("%d",T.mid); gotoxy(22,x); printf("%d/%d/%d",T.bk.gno,T.bk.gno,T.bk.no); gotoxy(30,x); printf("%d/%d/%d",T.i.day,T.i.mon,T.i.year); gotoxy(45,x); printf("%d/%d/%d",T.r.day,T.r.mon,T.r.year); gotoxy(60,x); printf("%d",T.fine); gotoxy(70,x); printf("%c",T.reason); x+=2; } line(); fclose(t); printf("\nA-Member added E-Member renewed D-Duplicate I card I-Book issued R-Book Returned"); fflush(stdin); getchar(); } void mainscr() { clrscr();

gotoxy(16,1); printf("LIBRARY MANAGEMENT SYSTEM\n"); gotoxy(8,2); printf("1:Input"); gotoxy(8,3); printf("2:Member"); gotoxy(8,4); printf("3:Book"); gotoxy(8,5); printf("4:Display"); gotoxy(8,6); printf("5:Exit"); }

OUTPUT
LIBRARY MANAGEMENT SYSTEM 1:Input

2:Member 3:Book 4:Display 5:Exit Enter your option:1 Enter the details of the member ID number :1 Name :priya Address :mylapore Member since- : Day :10 Month :1 Year :2005 Expiration : Day :10 Month :1 Year :2010 Enter the details of the member ID number :2 Name :sharadha Address :T.nagar Member since- : Day :10 Month - :1 Year :2005 Expiration : Day :10 Month :1 Year :2010 Enter the details of the member ID number :0

Enter the details of the book Book ID : Gno :1

Bno - :1 No :1 Name :Software_ Author :Pressman Publisher :printice Price :100 Enter the details of the book Book ID : Gno :2 Bno - :2 No :2 Name :Computer Author :sudharsan Publisher :technical Price _ :200 Enter the details of the book Book ID : Gno :0 Bno :0 No :0 LIBRARY MANAGEMENT SYSTEM 1:Input 2:Member 3:Book 4:Display 5:Exit Enter your option:2 LIBRARY MANAGEMENT SYSTEM MEMBER 1:Add New Member 2:Renew Existing Member 3:Issue Duplicate I-Card 4:Back Enter your option:1 Enter the details of the member ID number :3

Name :Anitha Address :parris Member since- : Day :10 Month :2 Year :2000 Expiration : Day :10 Month :2 Year :2004 LIBRARY MANAGEMENT SYSTEM MEMBER 1:Add New Member 2:Renew Existing Member 3:Issue Duplicate I-Card 4:Back Enter your option:2 Enter the Membership id:1 LIBRARY MANAGEMENT SYSTEM MEMBER 1:Add New Member 2:Renew Existing Member 3:Issue Duplicate I-Card 4:Back Enter your option:3 Enter the Membership id:2 LIBRARY MANAGEMENT SYSTEM MEMBER 1:Add New Member 2:Renew Existing Member 3:Issue Duplicate I-Card 4:Back Enter your option:4 LIBRARY MANAGEMENT SYSTEM 1:Input 2:Member

3:Book 4:Display 5:Exit Enter your option:3 LIBRARY MANAGEMENT SYSTEM BOOK 1:Add New Books 2:Issue Book 3:Return Book 4:Back Enter your option:1 Enter the details of the book Book ID : Gno :3 Bno :3 No :3 Name :physics Author :Mani Publisher :technical Price _ :300 LIBRARY MANAGEMENT SYSTEM BOOK 1:Add New Books 2:Issue Book 3:Return Book 4:Back Enter your option:2

Enter Book id: gno :1 bno :1

no :1 Enter Membership id :1 ISSUE DATE: Day :10 Return :2 Year: :2004 RETURN DATE: Day :10 Return :3 Year: :2004 BOOK ISSUED LIBRARY MANAGEMENT SYSTEM BOOK 1:Add New Books 2:Issue Book 3:Return Book 4:Back Enter your option:3 Enter Book id: gno :2 bno :2 no :2 Enter Membership id :2 ISSUE DATE: Day :10 Month :2 Year: :2007 RETURN DATE: Day :10 Month :3 Year: :2007 BOOK RETURNED:

LIBRARY MANAGEMENT SYSTEM BOOK 1:Add New Books

2:Issue Book 3:Return Book 4:Back Enter your option:4 LIBRARY MANAGEMENT SYSTEM 1:Input 2:Member 3:Book 4:Display 5:Exit Enter your option:4 LIBRARY MANAGEMENT SYSTEM DISPLAY 1:Member Details 2:Book Details 3:Transaction Details 4:Back Enter your option:1 -------------------------------------------------------------------------------Details of the member -------------------------------------------------------------------------------Member ID Name Address Member since Expiration -------------------------------------------------------------------------------1 2 priya mylapore 10/1/2005 10/1/2005 10/1/2010 10/1/2010

sharadha T.nagar

3 Anitha parris 10/2/2000 10/2/2004 -------------------------------------------------------------------------------LIBRARY MANAGEMENT SYSTEM DISPLAY 1:Member Details

2:Book Details 3:Transaction Details 4:Back Enter your option:2 -----------------------------------------------------------------------------------------Details of the book -----------------------------------------------------------------------------------------Book ID Book Name Author Name Publisher Name Price -----------------------------------------------------------------------------------------1/1/1 2/2/2 Software_ Computer Pressmanssman sudharsan printice technical 100 200

3/3/3 physics Mani technical 300 ----------------------------------------------------------------------------------------LIBRARY MANAGEMENT SYSTEM DISPLAY 1:Member Details 2:Book Details 3:Transaction Details 4:Back Enter your option:3

-------------------------------------------------------------------------------------------Details of the transactions --------------------------------------------------------------------------------------------

Trans ID Member ID Book ID Issued date Return date Fine Reason -------------------------------------------------------------------------------------------1 2 3 4 3 1 2 1 0/0/0 0/0/0 0/0/0 1/1/1 0/0/0 0/0/0 0/0/0 10/2/2004 0/0/0 0/0/0 0/0/0 10/3/2004 500 300 50 0 A E D I

5 2 2/2/2 10/2/2007 10/3/2007 10 R -------------------------------------------------------------------------------------------A-Member added E-Member renewed D-Duplicate I card I-Book issued RBook Returned LIBRARY MANAGEMENT SYSTEM DISPLAY 1:Member Details 2:Book Details 3:Transaction Details 4:Back Enter your option:4 LIBRARY MANAGEMENT SYSTEM 1:Input 2:Member 3:Book 4:Display 5:Exit Enter your option:5

TEST CASES INPUT PROCESSING OUTPUT

Input details of member and book: input { .. .. .. .. }

Input details: Input the details about the book and the members like book id, name, author and member name, id, address etc.

ID number :1 Name :priya Address mylapore Book ID : Gno-:1 Bno-:1 No-:1 Name :Software_ Author :Pressman Publisher :printice Price :100 MEMBER 1:Add New Member 2Renew Existing Member 3:Issue Duplicate I-Card 4:Back Enter your option:1 Enter the details of the member ID number :3 Name :Anitha Address :parris Enter your option:2 Enter the Membership id:1 Enter your option:3 Enter the Membership id:2

Member operations: member { .. .. .. .. }

Member operations: This function does the various operations like issue of duplicate id card, add new member, renew existing member etc.

Book operations: book { .. .. ..

Book operations: This function does the various operations like issue of book, return of book and adding new book into the file etc.

BOOK 1:Add New Books 2:Issue Book 3:Return Book 4:Back Enter your option:1

.. }

Enter the details of the book Book ID : Gno-:3 Bno-:3 No-:3 Name :physics Author :Mani Publisher:technical Price _ :300 Enter your option:2 Enter Book id: gno-:1 bno-:1 no-:1 Enter Membership id :1 ISSUE DATE: Day:10 Month:2 Year:2004 RETURN DATE: Day:10 Month:3 Year:2004 BOOK ISSUED Enter your option:3 Enter Book id: gno-:2 bno-:2 no-:2 Enter Membership id :2 ISSUE DATE: Day:10 Month:2 Year:2007 RETURN DATE: Day:10 Month:3 Year:2007 BOOK RETURNED:

ERROR TRACKING: Errors per requirements specification page : denoted by Ereq-3 Errors per component design level : denoted by Edesign-4 Errors per component code level : denoted by Ecode-0