forked from Daoud-Hussain/University-Management-System
-
Notifications
You must be signed in to change notification settings - Fork 1
/
LibraryManagement.java
57 lines (50 loc) · 1.72 KB
/
LibraryManagement.java
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
// package university;
import java.util.*;
public class LibraryManagement{
static Scanner input = new Scanner(System.in);
static Main mainClass = new Main(); // main class object
static Library libraryObj = new Library();
static void manage(String regNumber){
System.out.println("\n*******************************************************\n");
System.out.println("\tLibrary Management System\n");
System.out.println("*******************************************************\n");
System.out.print("1. Visit Library\n");
System.out.print("2. Previous Menu\n");
System.out.print("3. Exit\n");
System.out.println();
boolean flag = false;
while(true){
try{
System.out.print("Enter your choice : ");
int c = input.nextInt();
switch(c){
case 1:{
flag = true;
libraryObj.main(regNumber);
break;
}
case 2 : {
flag = true;
mainClass.management(regNumber);
break;
}
case 3 : {
System.exit(0);
break;
}
}
if(flag){
break;
}
else{
System.out.print("\nInvalid input, Try Again...\n");
input.nextLine();
}
}
catch(Exception e){
System.out.print("\nInvalid input, Try Again...\n");
input.nextLine();
}
}
}
}