0% found this document useful (0 votes)
21 views9 pages

C Arg

for c programmers

Uploaded by

ggdsurya1845
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views9 pages

C Arg

for c programmers

Uploaded by

ggdsurya1845
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Library Management System (LMS) :

DEPARTMENT OF COMPUTER SCIENCE


AND ENGINEERING
AY 2024-2025
Year: 1st Semester:1st
Section: B

INTRODUCTION TO PROGRAMMING LAB (23BEX07)


AUGMENTED EXPERIMENT
On

LIBRARY MANAGEMENT SYSTEM


Submitted by

Sl. No Sec. No Name JNTU No

01 B-06 E KUSUMA KUMARI 24341A4228


02 B-07 G C MANI GOPAL 24341A4229
03 B-08 G DEVI SHANKAR 24341A4234
04 B-09 G NITHIN 24341A4231
05 B-10 I DHANUSH 24341A4236

Signature of the Faculty with Date

Introduc on to programming Lab (23BEX07) // Augmented Experiment


Library Management System (LMS) :

A is a so ware applica on designed to manage the opera ons and ac vi es of a


library. It facilitates the efficient organiza on, cataloging, and retrieval of library
resources, such as books, journals, and other materials. The system allows
librarians and staff to perform a range of administra ve tasks, and it enables users
(typically library members or patrons) to search, borrow, return, and reserve
materials.
Key Func ons of a Library Management System:
1. Catalog Management:
o Allows librarians to catalog books, journals, audio-visual materials, e-
books, and other resources. It o en involves storing essen al
informa on such as tle, author, ISBN, publisher, edi on, and genre.
2. Book Search and Retrieval:
o Users can search for materials in the library's catalog using various
criteria such as tle, author, category, keywords, or ISBN. The search
results typically provide details about the availability and loca on of
the item within the library.
3. Issue and Return of Books:
o The LMS tracks the borrowing and return of materials by library users.
It records which items have been checked out, when they are due for
return, and generates reminders for overdue books.
4. Member Management:
o Manages library users by storing details such as membership number,
name, address, contact informa on, and borrowing history. It also
tracks fines for late returns or damaged items.
5. Reserva on System:
o Allows users to reserve books that are currently checked out. When
the book becomes available, the system no fies the user.
6. Fine Calcula on:
o The LMS calculates and records fines for overdue books based on
predefined rules (e.g., daily overdue fee).
7. Inventory Management:
o Manages the physical inventory of the library, ensuring that resources
are well organized and tracked. This includes monitoring lost or
damaged items, as well as conduc ng periodic stock audits.
8. Repor ng:
o The system can generate various reports, such as:
 Books borrowed and returned in a specific me frame.

Introduc on to programming Lab (23BEX07) // Augmented Experiment


Library Management System (LMS) :

Overdue items and pending fines.


 Book usage and popularity.
 Membership sta s cs.
User Interface:
 Provides a user-friendly interface for both librarians and library patrons.
Librarians can access back-end features like book management and member
records, while patrons can search for books, view availability, and check out
materials.

Benefits of an LMS:
 Efficiency: Automates many library processes, reducing administra ve work
and manual tracking.
 Accuracy: Reduces human errors in cataloging, inventory management, and
book transac ons.
 Improved User Experience: Provides users with an easy way to search,
borrow, and return materials, o en through self-service portals.
 Data-Driven Decisions: Helps library staff track usage pa erns and generate
reports for decision-making (e.g., purchasing decisions or service
improvements).
 Access to Informa on: Online library systems allow patrons to access the
catalog from anywhere, providing more convenience and increasing library
usage.
Examples of Library Management Systems:
1. Koha – An open-source LMS that provides features such as cataloging,
circula on, and acquisi on management.
2. LibraryThing – A web-based library cataloging and social networking service.
3. ALMA (Ex Libris) – A commercial cloud-based LMS designed for large
ins tu ons, o en used by academic libraries.
4. Evergreen – An open-source ILS (Integrated Library System) used by public
and consor al libraries.

Introduc on to programming Lab (23BEX07) // Augmented Experiment


Library Management System (LMS) :

Overall, a Library Management System helps streamline the complex tasks of


running a library, ensures be er organiza on of resources, and enhances the
experience for both library staff and users.

Aim:
C program on library management system

Materials Required:

*Personal computer
*Turbo C++ compiler

Algorithm:
Step-by-Step Algorithm to Convert Integer to Roman Numeral :

Step 1: Add a New Book


Input: Book details (Title, Author, ISBN, Genre, Year)
Process:
1. Check if the book already exists by ISBN.
o If yes, show "Book already exists."
o If no, add the book to the catalog.
2. Confirm that the book was added successfully.
Output: "Book added successfully" or "Book already exists."

Step 2. Search for a Book


Input: Search criteria (Title, Author, ISBN, Genre)
Process:
1. Search the catalog for books matching the input criteria.
2. If a match is found, show the book details.
3. If no match is found, show "No books found."
Output: List of books matching the search or "No books found."

Introduc on to programming Lab (23BEX07) // Augmented Experiment


Library Management System (LMS) :

Step 3. Borrow a Book


Input: Member ID, ISBN of the Book
Process:
1. Check if the book is available.
o If not available, show "Book is unavailable."
o If available, check if the member exists.
2. Mark the book as borrowed.
3. Set a due date for returning the book.
Output: "Book borrowed successfully. Due date: [Date]."

Step 4. Return a Book


Input: Member ID, ISBN of the Book
Process:
1. Check if the member exists.
2. Check if the member has borrowed the book.
o If the book was borrowed, mark it as returned.
o If the book is overdue, calculate the fine.
3. Update the system with the return details.
Output: "Book returned successfully" or "Fine: [Amount]."

Step 5. View Member Informa on


Input: Member ID
Process:
1. Retrieve and display the member’s informa on (name, contact, borrowed
books).
Output: Display member informa on (name, borrowed books, due dates).

PROGRAM:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Introduc on to programming Lab (23BEX07) // Augmented Experiment


Library Management System (LMS) :

#define MAX_BOOKS 100


#define TITLE_LENGTH 50
#define AUTHOR_LENGTH 50

typedef struct {
int id;
char tle[TITLE_LENGTH];
char author[AUTHOR_LENGTH];
int is_issued;
} Book;
Book library[MAX_BOOKS];
int book_count = 0;
void add_book() {
if (book_count >= MAX_BOOKS) {
prin ("Library is full!\n");
return;}
Book new_book = { .id = book_count + 1, .is_issued = 0 };
prin ("Enter tle: "); getchar();
fgets(new_book. tle, TITLE_LENGTH, stdin);
new_book. tle[strcspn(new_book. tle, "\n")] = 0;
prin ("Enter author: ");
fgets(new_book.author, AUTHOR_LENGTH, stdin);
new_book.author[strcspn(new_book.author, "\n")] = 0;
library[book_count++] = new_book;
prin ("Book added successfully!\n");
}
void view_books() {
if (book_count == 0) {
prin ("No books available in the library.\n");
return;}
prin ("ID\tTitle\tAuthor\tIssued\n");
for (int i = 0; i < book_count; i++) {
prin ("%d\t%s\t\t%s\t\t%s\n", library[i].id, library[i]. tle, library[i].author,
library[i].is_issued ? "Yes" : "No");}}
void update_book_status(int id, int status) {

Introduc on to programming Lab (23BEX07) // Augmented Experiment


Library Management System (LMS) :

if (id < 1 || id > book_count) {


prin ("Invalid book ID.\n");
return;}
library[id - 1].is_issued = status;
prin ("Book %s successfully!\n", status ? "issued" : "returned");}
int main() {
int choice, id;
while (1) {
prin ("\nLibrary Management System\n1. Add Book\n2. View Books\n3. Issue
Book\n4. Return Book\n5. Exit\nEnter your choice: ");
scanf("%d", &choice);
switch (choice) {
case 1: add_book(); break;
case 2: view_books(); break;
case 3:
prin ("Enter the ID of the book to issue: ");
scanf("%d", &id);
update_book_status(id, 1);
break;
case 4:
prin ("Enter the ID of the book to return: ");
scanf("%d", &id);
update_book_status(id, 0);
break;
case 5: exit(0);
default: prin ("Invalid choice. Please try again.\n");}}
return 0;
}
OUTPUT :

Introduc on to programming Lab (23BEX07) // Augmented Experiment


Library Management System (LMS) :

Introduc on to programming Lab (23BEX07) // Augmented Experiment


Library Management System (LMS) :

Introduc on to programming Lab (23BEX07) // Augmented Experiment

You might also like