0% found this document useful (0 votes)
93 views18 pages

Term Paper CSE-101: Submitted To Submitted by

This document is a term paper submitted by Amit Kumar for a course on the foundations of computing. The paper describes a book store management system project written in C programming language. The system allows users to enter new books into storage, retrieve book details, issue books to students, and maintain records of books issued and stock available. The paper provides an introduction to the system, outlines its advantages, describes the system requirements and analysis, includes the source code, discusses sample outputs, describes the future scope of the project, and lists references.

Uploaded by

Ankush Goyal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views18 pages

Term Paper CSE-101: Submitted To Submitted by

This document is a term paper submitted by Amit Kumar for a course on the foundations of computing. The paper describes a book store management system project written in C programming language. The system allows users to enter new books into storage, retrieve book details, issue books to students, and maintain records of books issued and stock available. The paper provides an introduction to the system, outlines its advantages, describes the system requirements and analysis, includes the source code, discusses sample outputs, describes the future scope of the project, and lists references.

Uploaded by

Ankush Goyal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

TERM

PAPER

CSE-101

Submitted to:
Mr. Mohit arora ( Deptt. Of COMPUTER)

Submitted by:
Amit kumar Roll.No.- RB6002A12 Reg.No- 11004528 Course- B.Tech-(ECE)

LOVELY SCHOOL OF ENGINEERING


ACKNOWLEDGEMENT
I Amit kumar of section B6002 registration no. 11004528 and roll no. A12 of course B.Tech. ECE hereby submit my termpaper on foundation of computing. I have done this project of Book store management system under the

guidance of Mr. Mohit arora . This is my great experience of C programming to submit this project. I would like to thank my teacher , my friends,and other sources that gave an unending support and helped me in numerous ways from the first stage of my term assignment concieved.

AMIT KUMAR ROLL: A12

1. INTRODUCTION 2. ADVANTAGES 3. SYSTEM REQUIREMENTS AND ANALYSIS 4. SOURCE CODE 5. OUTPUT 6. FUTURE SCOPE OF PROJECT 7. REFERENCES

INTRODUCTION
C is a programming language developed at AT &Ts bell laboratories of USA in 1972.It was deigned by Dennis Retchie. This project of BOOK STORE MANAGEMENT SYSTEM gives us the complete information about the storage of books.We can enter the record of new books and retrieve the details of books available .We can issue the books to the student and maintain their records and can also check available . number of books issued and stock

The book store Management system is designed & developed for a receipt and issuance of books along with the students details.The books received in this system are entered in books entry form.When the student wants to get the desired books the same is issued on the availability basis to the student. This program helps us to do many further aspects in the future.~~~~!!!!!!

Advantages:-There are many advantages of this system whose name is book store management System This system

process made computerized to reduce human errors and to increase the efficiency.The main focus of this project is to lesson human efforts.The maintenance of the records is made efficient, as all the record are stored in the access database, through which data can be retrieved easily.

System Requirements and Analysis


A database to store the details about the books should be designed. These are follows--S. No. 1. Field Name Article Id Field Range Any valid 5 digit number Remarks This is the key field of the database. We can have some alpha numeric character in the beginning to show if the article is a book/journal. If a name exceeds 25 characters, the first 25 characters are taken. ___

2.

Name of the book

Up to 25 characters in length. Up to 25 characters in length. Up to 25 characters in length.

3.

Name of the author(s) Publisher

4.

If a name exceeds 25 characters, the first 25 characters are taken. This is the publication year.

5. 6.

Year of publication From 1900 to 2099 Subject

Up to 25 character Like mathematics, physics chemistry in length etc. Up to 15 character Id of the person who has currently in length borrowed it.

7.

Borrowers user Id

Source Code :
#include<stdio.h> #include<dos.h> #include<ctype.h> #include<stdlib.h> #include<string.h> #define nm 20 #define cal 2 #define idn 5 #define dt 2 void chk_name(char *p,int); void chk_id(char *p,int); int duplicate(char temp[]); int duplicatest(char temp[]); void studinfo(); void issue(); void returned(); void viewstfo(); void view1(); void stuissue(); struct lib { char bname[nm]; char bid[idn]; } lib1; struct isue { char sid[idn]; char bid[idn]; int isdate; int redate; } iss1;

struct ret { char sid[idn];

char bid[idn]; int redate; } ret1; struct st { char sid[idn]; char sname[nm]; //struct lib lib2; //struct isue iss2; //struct ret ret2; } st1; void main() { clrscr(); gotoxy(1,1); do { printf("\nThis is book store management\n1.Issue book\n2.Return book\n3.View issued books\n4.Student info\n5.View student info\n6.Exit\n7.Issued by one student "); scanf("%d",&choice); switch(choice) { case 1: issue(); break; case 2: returned(); break; case 3: view1(); break; case 4: studinfo(); break; case 5: viewstfo(); break; case 6: exit(0); case 7: stuissue(); break; default: printf("One among 1,2,3,4"); getch(); } int choice;

}while(choice!='6'); } void issue() //Function definitions

char temp[idn];

char btemp[idn]; FILE *fp; fp=fopen("boissue.rec","ab"); printf("\nEnter book id:"); chk_id(btemp,idn); strcpy(iss1.bid,btemp); { getdate(&d); printf("\nTodays date:%d",d.da_day); iss1.isdate=d.da_day; } iss1.redate=iss1.isdate+10; struct date d;

printf("\nEnter student's ID:"); chk_id(temp,idn); strcpy(iss1.sid,temp); fwrite(&iss1,sizeof(iss1),1,fp); printf("\nINfo saved , can be issued"); printf("\nExpected date of return is comming: %d",iss1.redate); } { int ch; FILE *fp; fp=fopen("boissue.rec","rb"); printf("Enter book's code:"); chk_id(temp,idn); void returned() char temp[idn];

while(fread(&iss1,sizeof(iss1),1,fp)&&strcmp(temp,iss1.bid)); ch=strcmp(temp,iss1.bid); if(ch!=0) { else printf("No such book");}

fseek(fp,ftell(fp)-sizeof(iss1),0); fwrite(&iss1,sizeof(iss1),1,fp); printf("Book returned"); } fclose(fp);

} void chk_name(char *p,int size) { int i=0; do { ch=getch(); if(((ch>='a' && ch<='z')||(ch==' ')||(ch>='A'&& ch<='Z'))&&(i<size-1)) { i++; printf("%c",ch); } else if(ch==8 &&i>0) { i--; p--; } } while(ch!=13); printf("%c%c%c",8,32,8); *p++=ch; char ch,c[30];

c[i]='\0'; *p='\0'; } { int i=0; do { ch=getch(); void chk_id(char *p,int size) char ch;

if((ch>='0' && ch<='9')&&(i<size-1))

{ i++; p++;

*p=ch;

printf("%c",ch); } else if(ch==8 &&i>0) { i--; p--; } } *p='\0'; } int duplicate(char temp[]) { FILE *fp; fp=fopen("boissue.rec","rb"); while(fread(&iss1,sizeof(iss1),1,fp)&&strcmp(iss1.sid,temp)); while(ch!=13 || i<size-1); printf("%c%c%c",8,32,8);

fclose(fp); if(strcmp(temp,iss1.sid)==0) return 1; else return 0; } { FILE *fp; fp=fopen("boissue.rec","rb"); int ch;

if(fp!=NULL) { while(fread(&iss1,sizeof(iss1),1,fp))

if(strcmp(iss1.sid," ")!=0) { printf("\nStudent ID:%s date:%d\n",iss1.sid,iss1.bid,iss1.isdate,iss1.redate); } if(strcmp(iss1.sid," ")==NULL) { else printf("Not found"); }} Book ID:%s Issue date:%d Due return

printf("Unable to open file"); } }

*/ void studinfo() { char temp[idn]; FILE *fp;

if(fp!=NULL) { fp=fopen("studinfo.rec","ab"); do { printf("\nEnter unique student ID:"); chk_id(temp,idn); } strcpy(st1.sid,temp); printf("\nEnter student's name:"); chk_name(st1.sname,nm); fwrite(&st1,sizeof(st1),1,fp); fclose(fp); while(duplicatest(temp));

} { } int duplicatest(char temp[]) { FILE *fp;

else printf("File not found"); }

fp=fopen("studinfo.rec","rb"); while(fread(&st1,sizeof(st1),1,fp)&&strcmp(st1.sid,temp)); if(strcmp(st1.sid,temp)==0) { else return 0; } { FILE *fp; fp=fopen("studinfo.rec","rb"); int ch; void viewstfo() return 1; }

if(fp!=NULL) { while(fread(&st1,sizeof(st1),1,fp)) if(strcmp(st1.sid," ")!=0) { printf("\nStudent id:%sStudent name:%s ",st1.sid,st1.sname); }

if(strcmp(st1.sid," ")==NULL) { printf("No records"); }

fclose(fp); } { else

printf("File not found"); } } void view1() int ch; FILE *fp,*f;

fp=fopen("boissue.rec","rb"); f=fopen("studinfo.rec","rb"); if(fp!=NULL) { while(fread(&iss1,sizeof(iss1),1,fp)&&fread(&st1,sizeof(st1),1,f)) if((iss1.sid," ")!=0) if(strcmp(iss1.sid,st1.sid)==0) { printf("\nStudent ID:%s Book ID:%s Student) } Issue date:%d Due return date:%d

OUTPUT:-This is book store management 1. Issue book 2. return book 3. view issued books 4. student informations 5. view student information

case 1: book issue.c enter book id : 1234 today date is : 21 09 08 enter student id : 2343 information saved , can be issue expected date of return is coming : 21 09 08

Future scope of project


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 computersisation of the book management will not only improve the efficiency but will also reduce human stress thereby indirectly improvely human recourses.

REFRENCES
1 ANSI C
2 ANSI C 3 LAZOS 1994 4 KELLS ,KARN AND BLAND 1943 5 SCHUMIDHUBER 6 WWW.SOURCECODE WORLD.COM 7WWW.PLANETSOURCE.COM 8 WWW.DREAMCODE.NET.COM

BALAGURUSWAMI
KAMTHANI

You might also like