-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
77 lines (71 loc) · 2.42 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include <stdio.h>
#include <stdlib.h>
#include "student_section.h"
#include "book_section.h"
#include "book_issue_section.h"
#include "BinarySearchTree.h"
#include "student.h"
#include "book.h"
#include "student.h"
#include "ArrList.h"
void main_manu(BinarySearchTree *booktree, ArrList *list)
{
int n, b;
do
{
printf("\n");
printf(".........................\n");
printf("| LIBRARY MANAGEMENT |\n");
printf("| |\n");
printf("| for operater |\n");
printf(".........................\n\n");
printf("\nPress<1> For Student section\n");
printf("Press<2> For Book section\n");
printf("Press<3> For Book issue section\n");
printf("Press<4> For To exit this program\n");
printf("Enter your chosen :\n");
scanf("%d", &n);
switch (n)
{
case 1:
student_section(booktree, list);
break;
case 2:
book_section(booktree, list);
break;
case 3:
booK_issue_section(booktree, list);
break;
case 4:
exit(0);
default:
printf("please enter correct choice\n");
}
printf("\n");
printf("\n");
printf("Press <1> To continue with main menu\n");
scanf("%d", &b);
} while (b == 1);
}
int main()
{
BinarySearchTree *booktree = new_BinarySearchTree();
ArrList *list;
list = new_ArrList();
printf("\t\t\t###########################################################################");
printf("\n\t\t\t############ ############");
printf("\n\t\t\t############ Library management System Project in C ############");
printf("\n\t\t\t############ ############");
printf("\n\t\t\t############ (BST and ArrList implementation)######");
printf("\n\t\t\t###########################################################################");
printf("\n\t\t\t---------------------------------------------------------------------------\n");
printf("\n\t\t\t----------------------------------------------------------------------------");
printf("\n");
printf("\n");
main_manu(booktree, list);
getchar();
del_ArrList(list);
delete_BinarySearchTree(booktree);
exit(0);
return 0;
}