-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
32 lines (23 loc) · 766 Bytes
/
Copy pathMain.java
File metadata and controls
32 lines (23 loc) · 766 Bytes
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
import java.util.Scanner;
import resources.data_structures.DataStructuresMenu;
import resources.algorithms.AlgorithmsMenu;
import resources.Menu;
public class Main {
public static void main(String[] args) {
System.out.println("1: Data Structures");
System.out.println("2: Algorithms");
Scanner scanner = new Scanner(System.in);
int choice = scanner.nextInt();
scanner.close();
Menu menu = null;
if (choice == 1) {
menu = new DataStructuresMenu();
} else if (choice == 2) {
menu = new AlgorithmsMenu();
} else {
System.out.println("Invalid choice. Please enter 1 or 2.");
return;
}
menu.displayMenu();
}
}