-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
54 lines (49 loc) · 1.34 KB
/
Copy pathmain.cpp
File metadata and controls
54 lines (49 loc) · 1.34 KB
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
#include "Library.h"
#include <iostream>
using namespace std;
int main() {
Library library;
int choice;
do {
cout << "Library Management System" << endl;
cout << "1. Register Student" << endl;
cout << "2. View Books" << endl;
cout << "3. Issue Book" << endl;
cout << "4. Return Book" << endl;
cout << "5. Search Book" << endl;
cout << "6. Delete Book" << endl;
cout << "7. Display Issued Books" << endl;
cout << "8. Exit" << endl;
cout << "Enter your choice: ";
cin >> choice;
switch (choice) {
case 1:
library.registerStudent();
break;
case 2:
library.displayBooks();
break;
case 3:
library.issueBook();
break;
case 4:
library.returnBook();
break;
case 5:
library.searchBook();
break;
case 6:
library.deleteBook();
break;
case 7:
library.displayIssuedBooks();
break;
case 8:
cout << "Exiting..." << endl;
break;
default:
cout << "Invalid choice! Please try again." << endl;
}
} while (choice != 8);
return 0;
}