forked from AdvancedProgramming1404/WS-10-Database
feat(ui): add initial console interface for restaurant system
This commit is contained in:
@@ -0,0 +1,44 @@
|
|||||||
|
package dev.ui;
|
||||||
|
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
public class ConsoleMenu {
|
||||||
|
|
||||||
|
private final Scanner scanner =
|
||||||
|
new Scanner(System.in);
|
||||||
|
|
||||||
|
public void start() {
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
|
||||||
|
System.out.println();
|
||||||
|
System.out.println("===== JAVA PIZZERIA =====");
|
||||||
|
System.out.println("1. Login");
|
||||||
|
System.out.println("2. Register");
|
||||||
|
System.out.println("3. Exit");
|
||||||
|
|
||||||
|
int choice = scanner.nextInt();
|
||||||
|
|
||||||
|
switch (choice) {
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
return;
|
||||||
|
|
||||||
|
default:
|
||||||
|
System.out.println("Invalid choice");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user