-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMnOperation1.java
More file actions
42 lines (37 loc) · 1.19 KB
/
MnOperation1.java
File metadata and controls
42 lines (37 loc) · 1.19 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 MnOperation1 {
public static void MnOP() {
Scanner scnr = new Scanner(System.in);
boolean found = true;
String srt = "========PLEASE SELECT ONE OF THESE OPTION BELOW. =========\n"
+ " 1) RETRIEVE FILE IN ASCENDING ORDER \n"
+ " 2) BUSINESS-LEVEL OPERATIONS \n"
+ " 3) CLOSE THE APPLICATION \n";
do {
try {
System.out.println(srt);
int sd = scnr.nextInt();
switch(sd) {
case 1:
scnr = new Scanner(System.in);
System.out.println("Print File in Ascending Order");
OperationOnFile.RetriveInAacendingOrder();
break;
case 2:
MainMethod.MnuOperation2();
System.out.println(srt);
break;
case 3:
System.out.println("APPPLICATION CLOSED!!!");
scnr.close();
System.exit(0);
break;
}
}catch(Exception ex) {
System.out.println(ex.getClass().getName());
System.out.println(srt);
int sd = scnr.nextInt();
}
}while (found == true);
}
}