Book Shop System Abstract
Book Shop System Abstract
INTRODUCTION
This chapter gives an overview about the aim , objectives ,background and operation
environment of the system.
Books and student maintenance modules are also included in this system which
would keep track of the students using the library and also a detailed description
about the books a library contains. With this computerized system there will be
no loss of book record or member record which generally happens when a non
computerized system is used.
All these modules are able to help librarian to manage the library with more
convenience and in a more efficient way as compared to library systems which
are not computerized.
1.5 OPERATION ENVIRONMENT
The task is to build the bookshop management system using file handling in C++ that
helps to keep track of all the book records in a file. Below are the features to be
implemented:
Add new book and the details of the book are:
Book ID
Name of book
Name of Author
Number of books
Delete a book
Update a book
View all the books
Exit
Approach:
All the functions will be provided under switch cases.
The concept of file handling will be used to write the data in a text file and
read the written data as well.
The required function will be written under the switch cases which will be
executed as per the input of the user.
Simple file handling concepts like opening a file, closing a file, writing in a file
and reading the file, etc. are used to develop the code.
An IDE for compiling C++ language code.
Below is the implementation of the above approach:
CODING
// C++ program to illustrate bookshop
// management system using File Handling
#include <fstream>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
// Bookshop Class
class bookshope {
public:
void control_panel();
void add_book();
void show_book();
void check_book();
void update_book();
void del_book();
};
system("pause");
while (!file.eof()) {
if (b_idd == b_id) {
system("cls");
cout << "\n\n\t\t\t\t"
<< "Check Particular Book";
cout << "\n\nBook ID : "
<< b_id;
cout << "\nName : "
<< b_name;
cout << "\nAuthor : "
<< a_name;
cout << "\nNo. of Books : "
<< no_copy;
cout << endl
<< endl;
count++;
break;
}
file >> b_id >> b_name;
file >> a_name >> no_copy;
}
system("pause");
file.close();
if (count == 0)
cout << "\n\nBook ID Not"
<< " Found...";
}
}
if (!file)
cout << "\n\nFile Opening Error!";
else {
if (!file)
cout << "\n\nFile Opening Error...";
else {
if (b_id == b_idd) {
system("cls");
cout << "\n\n\t\t\t\t"
<< "Delete a Book";
cout << "\n\nBook is Deleted "
"Successfully...\n\n";
count++;
}
else
file1 << " " << b_idd
<< " " << b_name
<< " " << a_name
<< " " << no_copy
<< "\n\n";
file >> b_idd >> b_name;
file >> a_name >> no_copy;
}
if (count == 0)
cout << "\n\nBook ID "
<< "Not Found...";
}
system("pause");
while (1) {
b.control_panel();
cout << "\n\nEnter your choice : ";
cin >> choice;
switch (choice) {
case 1:
do {
b.add_book();
cout << "\n\nWant to add"
<< " another book? "
"(y/n) : ";
cin >> x;
} while (x == 'y');
break;
case 2:
b.show_book();
break;
case 3:
b.check_book();
break;
case 4:
b.update_book();
break;
case 5:
b.del_book();
break;
case 6:
exit(0);
break;
default:
cout << "\n\nINVALID CHOICE\n";
}
}
}
// Driver Code
int main()
{
// Function Call
bookShopRecord();
return 0;
}
Proposed System:
The new system uses the concept of binary search method to make searching process faster and
provide results within short interval of time. As each modules has been divided into class and
functions, so the execution time of this system is optimized as compared to the previous system. To
make data secure and maintain data integrity proper mechanism has been used to perform validation
process at the client side before saving any data and information to a particular file. Users will be
provided with friendly screen, whether they have to just few information’s regarding their query and
all processing work will be done at the back side.