-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
42 lines (34 loc) · 1.21 KB
/
Copy pathMain.java
File metadata and controls
42 lines (34 loc) · 1.21 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
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
LibaryManagementService l = new LibaryManagementService();
System.out.println("***************** Welcome to Libary Management System *****************");
int choise;
try {
do {
System.out.println("1. Add Book\n2.Display Book\n3.Remove Book\n4.Exit");
System.out.println("Enter Your Choise: ");
choise = sc.nextInt();
switch (choise) {
case 1:
l.addBook();
break;
case 2:
l.displayBook();
break;
case 3:
l.removeBook();
break;
case 4:
l.exit();
break;
default:
System.out.println("Enter valid choise..!");
}
} while (choise != 4);
} catch (Exception e) {
System.out.println("Something went wrong..!");
}
}
}