Sunteți pe pagina 1din 22

INTRODUCTION TO PROGRAMMING PROJECT LIBRARY MANAGEMENT

HEADER FILES::
#include<iostream.h> #include<conio.h> #include<fstream.h>

FLOW CHART

START

Char mainmenu(char menu); Char mainfunk(char main1); Void search_name(char[],int); Void search_student(int[],int); Void search_book(char[],int); Void fine(int[],int,int[],int,int[],int,int[],int,int[ ],int,int[],int); Void books_issued(int[],int); Void re_issue(char[],int); Char exit(char msg); Char back(char bm);

//funct declarations//

//main func & call for main menu//

main() { textbackground(WHITE); textcolor(BLUE); clrscr(); char menu; cout<<menu; mainmenu(menu);}

//func defini of main menu & call mainfunk//

char mainmenu(char menu) cout<<menu; cin>>main1; mainfunk(main);

Char mainfunk(charmain1)

Switch (main1)

Case I:

//input of data And making of file And reading data from file//

Input data ofstream myfile; myfile.open(file_handle.txt,ios::out); myfile.close(); Ifstream myfile1; myfile1.open(file_txt,ios::in); myfile1.close();

search_name (name,20);

CaseA: //funct call for search Student// //arrows going Towards func def//

caseB: search_student(reg _no,10);

//funct call for search stud By reg no//

CaseC: search_book(name _book,50);

//func call for search book//

CaseD: fine(dd,10,mm,10,yy,10 ,dd1,10,mm1,10,yy1,10 ); //func call for cal fine//

CaseE: //func call for limiting books issued//

books_issued(no_book sissued,10);

CaseF:
re_issue(name_issued book,50);

//fun call check book issued//

Switch (bm) //switch in a switch// mainmenu(menu);

CaseY:

//func call for going into back//

CaseX:

//func call for exit//

exit(msg);

default:
Cout<<wrong entery;

//default used for wrong entery//

//func def for search stud by name// void search_name(charna me[][20],int)

Int i=0
//for loop// while

NO
i<x; if YES

//if statement//

name[i]= =na1[i]

i++;

then Cout<<student found;

else Cout<<student not found;

break;

10

Void search_student(int reg_no[],int)

//func defini for search student by reg no//

Int j=0

//for loop//

while NO j<x; if //if statement// reg_no[j] ==reg[j]; YES

J++;

11

THEN Cout<<student found;

ELSE Cout<<stud not found;

break;

12

//func defini for search book// Void search_book(char name_book[],int) Int j=0 //for loop// while

NO
j<x; //if statement// if YES

name_bo ok[j]==na[ j];


J++;

13

THEN Cout<<book found;

ELSE Cout<<book not found;

break;

14

//fun defini for cal fine//

Void fine(int dd[],int, int mm[],int,int yy[],int,int dd1[],int mm1[],int,yy1[],int)


Int j=0 //for loop// while

NO
j<x; //if statement// YES ((dd1[j]dd[j]>=5)&&(mm1[j]!= mm[j])&&(yy[j]!=yy1[j ])) J++;
15

if

THEN U=dd1[j]-dd[j]; Fine=u*0.25; Cout<<fine is<<fine; ELSE

Cout<<student has no fine;

break;
16

Void books_issued(int no_booksissued[],int)

//func defini forl imiting books issued//

Int j=0 //for loop// while

NO
j<x; //if statement// if YES

no_booksi ssued[j]>= 5
J++;

THEN

Cout<<more books cant be issued;

ELSE Cout<<you can issue the book;

break;
18

//func definition for check issued Books cant reissue// Void re_issue(char name_issuedbook[],inty) Int j=0 //for loop// while

NO
j<x; //if statement// if YES

name_issue dbook[j]==n a_issue[j]


J++;

THEN

Cout<<book cant be issued it is already issued;

Cout<<book is not already issued;

break;
20

char exit(char msg)

Cout<<msg; Cout<<prog presented by sadaf&anoushia to sir zubair::press any key to exit;

EXIT

21

REFRENCE FROM:: SIR ZUBAIR ALI DIETEL & DIETEL INTERNET SEARCHING

22

S-ar putea să vă placă și