This repository has been archived by the owner on Oct 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bookmain.cpp
79 lines (76 loc) · 1.49 KB
/
bookmain.cpp
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
78
79
#include"book.h"
int main()
{
Library a;
int option,choice;
do
{
cout<<"\n\n\n User Defined Class \n\n\n";
cout<<" 1. Input And Display \n";
cout<<" 2. Sort \n";
cout<<" 3. Insert \n";
cout<<" 4. Delete \n";
cout<<" 5. Search \n";
cout<<" 6. Exit \n";
cout<<"\n Enter Choice : ";
cin>>option;
switch(option)
{
case 1 :
{
cout<<"\n\n Input and Display \n\n";
a.input();
a.display();
break;
}
case 2 :
{
cout<<"\n\n Sort \n\n";
a.input();
a.display();
a.sort();
a.display();
break;
}
case 3 :
{
cout<<"\n\n Insert \n\n";
a.input();
a.display();
a.insert();
a.display();
break;
}
case 4 :
{
cout<<"\n\n Delete \n\n";
a.input();
a.display();
a.delete1();
a.display();
break;
}
case 5 :
{
int bookno1,temp;
cout<<"\n\n Search \n\n";
a.input();
a.display();
cout<<"\n\n Enter Book No To Be Searched : ";
cin>>bookno1;
temp=a.search(bookno1);
break;
}
default:
{
cout<<"\n\n Exiting The Program.....\n\n";
break;
}
}
cout<<"\n\n Do You Want To Continue ( Type 0 Or 1 ) : ";
cin>>choice;
cout<<endl<<endl;
}while(choice);
cout<<"\n\n The End \n\n";
return 0;
}