You are on page 1of 9

Green University of Bangladesh

Department of Computer Science and Engineering (CSE)


Faculty of Sciences and Engineering
Semester: (Summer, Year:2022), B.Sc. in CSE

Course Title: Structured Programming Lab

Course Code: CSE 104


Section: D1

Lab Project Name: GUB Online Library Management System

Student Details

Name ID
1. Md. Fahim Ahammed Riyad 221002603

Submission Date: 10-09-2022

Course Teacher’s Name:


MR. HUMAYAN KABIR RANA
(Senior Lecturer)
Department of CSE, Green University of Bangladesh.

Lab Project Status

Marks: ………………………………… Signature: .....................

Comments: .............................................. Date: ..............................

1 | Page
Introduction
‘GUB Online Library Management System’ is a system which maintains the information
about the books that present in the library, display book information, list of specified
books, count of books in the library. This is very difficult to organize manually.
Maintenance of all this information manually is a very complex task. Owing to the
advancement of technology, organization of an Online Library becomes much simple.
The GUB Online Library Management has been designed to computerize and automate
the operations performed over the information and all other operations. This
computerization of library helps in many instances of its maintenances. It reduces the
workload of management as most of the manual work done is reduced.

Objective
The project aims and objectives that will be achieved after completion of this project are
discussed in this subchapter.
The aims and objectives are as follows-
➢ Easy to manage & count present books in the library,
➢ Display their Information at a click,
➢ Online book reading,
➢ A search column to search availability of books,
➢ Facility to download required book,
And many other facilities.

Implementation of the project


1. Add Book Information: In this section we can input book details to store.
2. Display book information: Here we can see all the book information
3. List all books of given author : We can search book by author name.
4. List the title of specified book : We can search book and show it by specified title.
5. List the count of books in the library: Easily we can check how many books are
there in our library.
6. Exit : Last of all when we want to quit from the program this option will work.

2 | Page
SOFTWARE REQUIREMENTS:

• Operating System : Microsoft XP/Windows 7/ Windows 10/ Windows 11


• Platform : Code Blocks,
• Application Software : MS Office

HARDWARE REQUIREMENTS :
• Processor : Any
• RAM : 2GB or Above
• Hard Disk : 500 GB Hard Disk or Above

3 | Page
Flowchart

4 | Page
CODE:
#include<stdio.h>
struct library
{
char bk_name[30];
char author[30];
int pages;
float price;
};

int main()
{
struct library l[100];
char ar_nm[30],bk_nm[30];
int i,j, keepcount;
i=j=keepcount = 0;

while(j!=6)
{
printf("\t*** GUB Online Library Management System ***\n \t Coded by- FAHIM AHAMMED
RIYAD\n\n\n");
printf("\t 1. Add Book Information\n");
printf("\t 2. Display book information\n");
printf("\t 3. List all books of given author\n");
printf("\t 4. List the title of specified book\n");
printf("\t 5. List the count of books in the library\n");
printf("\t 6. Exit");

printf ("\n\nEnter one of the above : ");


scanf("%d",&j);

switch (j)

5 | Page
{
case 1:
printf ("Enter Book name = ");
scanf ("%s",l[i].bk_name);

printf ("Enter Author name = ");


scanf ("%s",l[i].author);

printf ("Enter Pages = ");


scanf ("%d",&l[i].pages);

printf ("Enter Price = ");


scanf ("%f",&l[i].price);
keepcount++;
break;

case 2:
printf("You have entered the following information\n");
for(i=0; i<keepcount; i++)
{
printf ("Book name = %s",l[i].bk_name);

printf ("\t Author name = %s",l[i].author);

printf ("\t Pages = %d",l[i].pages);

printf ("\t Price = %f",l[i].price);


}
break;

case 3:
printf ("Enter author name : ");

6 | Page
scanf ("%s",ar_nm);
for (i=0; i<keepcount; i++)
{
if (strcmp(ar_nm, l[i].author) == 0)
printf ("%s %s %d %f",l[i].bk_name,l[i].author,l[i].pages,l[i].price);
}
break;

case 4:
printf ("Enter book name : ");
scanf ("%s",bk_nm);
for (i=0; i<keepcount; i++)
{
if (strcmp(bk_nm, l[i].bk_name) == 0)
printf ("%s \t %s \t %d \t %f",l[i].bk_name,l[i].author,l[i].pages,l[i].price);
}
break;

case 5:
printf("\n Number of books in library : %d", keepcount);
break;
case 6:
exit (0);
}
}
return 0;

Output

7 | Page
8 | Page
Conclusion
A complete and useful library management can only be developed with lot of intensive
effort and time. Due to lack of time and we are beginners in programming program that
we expected can’t be developed by us. Our Online library management may not be must
useful for library in our college but it will be the most useful for study and programming
practice using C. As a whole, the project has been a good learning experience for us. We
have gained knowledge about the various aspects of C programming. At the same time,
we have developed a deep understanding about the file handling in C.

9 | Page

You might also like