forked from Daoud-Hussain/University-Management-System
-
Notifications
You must be signed in to change notification settings - Fork 1
/
TransportManagement.java
51 lines (44 loc) · 1.28 KB
/
TransportManagement.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
import java.util.*;
public class TransportManagement{
static Scanner input = new Scanner(System.in);
static Main mainClass = new Main(); // main class object
static TMS transportObj = new TMS();
static void manage(String regNumber){
System.out.println("\n*******************************************************\n");
System.out.println("\tTransport Management System\n");
System.out.println("*******************************************************\n");
System.out.print("1. Visit transport management system\n");
System.out.print("2. Previous Menu\n");
System.out.print("3. Exit\n");
System.out.println();
while(true){
try{
System.out.print("Enter your choice : ");
int c = input.nextInt();
boolean valid = false;
switch(c){
case 1 : {
transportObj.manage(regNumber);
valid = true;
break;
}
case 2 : {
mainClass.management(regNumber);
valid = true;
break;
}
case 3 : {
System.exit(0);
}
}
if(valid){
break;
}
}
catch(Exception e){
System.out.println("Invalid input! Try again. ");
input.nextLine();
}
}
}
}