Professional Documents
Culture Documents
MINI PROJECT
EC8393-FUNDAMENTALS OF DATA STRUCTURES IN C
(2019-2020)
Year : II
Semester : III
ANAND INSTITUTE OF HIGHER TECHNOLOGY
OLD MAHABALIPURAM ROAD, KALASALINGAM NAGAR
KAZHIPATTUR, NEAR CHENNAI-603 103.
project work under my supervision during the Academic Year 2017 - 2018 .
computerized system to maintain all the daily work of library .This project
has many features which are generally not availiable in normal library
login .It also has a facility of admin login through which the admin can
monitor the whole system .It also has facility of an online notice board
seminars being held in our colleges or nearby colleges and librarian after
can add it to the notice board . It has also a facility where student after
logging in their accounts can see list of books issued and its issue date and
return date and also the students can request the librarian to add new books
by filling the book request form.The librarian after logging into his account
ie admin account can generate various reports such as student report , issue
Overall this project of ours is being developed to help the students as well as
staff of library to maintain the library in the best way possible and also
void init()
{
FILE *fp = NULL;
int status = 0;
const char defaultUsername[] ="aticleworld\n";
const char defaultPassword[] ="aticleworld\n";
sFileHeader fileHeaderInfo = {0};
status = isFileExists(FILE_NAME);
if(!status)
{
//create the binary file
fp = fopen(FILE_NAME,"wb");
if(fp != NULL)
{
//Copy default password
strncpy(fileHeaderInfo.password,defaultPassword,sizeof(defaultPassword));
strncpy(fileHeaderInfo.username,defaultUsername,sizeof(defaultUsername));
fwrite(&fileHeaderInfo,FILE_HEADER_SIZE, 1, fp);
fclose(fp);
}
}
}
printMessageCenter():
This function prints the message in the middle of the head massage. I have passed the
message in this function as per the operation.
void welcomeMessage()
{
headMessage("www.aticleworld.com");
printf("\n\n\n\n\n");
printf("\n\t\t\t **-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**\n");
printf("\n\t\t\t =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
printf("\n\t\t\t = WELCOME =");
printf("\n\t\t\t = TO =");
printf("\n\t\t\t = LIBRARY =");
printf("\n\t\t\t = MANAGEMENT =");
printf("\n\t\t\t = SYSTEM =");
printf("\n\t\t\t =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
printf("\n\t\t\t **-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**\n");
printf("\n\n\n\t\t\t Enter any key to continue.....");
getch();
}
isNameValid():
It validates the user name, author name ..etc. I have permitted this function to take
the space in names.
void menu()
{
int choice = 0;
do
{
headMessage("MAIN MENU");
printf("\n\n\n\t\t\t1.Add Books");
printf("\n\t\t\t2.Search Books");
printf("\n\t\t\t3.View Books");
printf("\n\t\t\t4.Delete Book");
printf("\n\t\t\t5.Update Password");
printf("\n\t\t\t0.Exit");
printf("\n\n\n\t\t\tEnter choice => ");
scanf("%d",&choice);
switch(choice)
{
case 1:
addBookInDataBase();
break;
case 2:
searchBooks();
break;
case 3:
viewBooks();
break;
case 4:
deleteBooks();
break;
case 5:
updateCredential();
break;
case 0:
printf("\n\n\n\t\t\t\tThank you!!!\n\n\n\n\n");
exit(1);
break;
default:
printf("\n\n\n\t\t\tINVALID INPUT!!! Try again...");
} //Switch Ended
}
while(choice!=0); //Loop Ended
}
addBookInDataBase():
This function opens the binary file in append mode and writes the book and the
details.