user
Anonymous
java
05/04/2024 10:26 AM
688 B
18
Indexable
package assignments.assignment3.systemCLI;
import java.util.Scanner;
public abstract class UserSystemCLI {
protected Scanner input = new Scanner(System.in);
public void run() {
boolean isLoggedIn = true;
while (isLoggedIn) {
displayMenu();
int command = input.nextInt();
input.nextLine();
isLoggedIn = handleMenu(command);
}
}
abstract void displayMenu();
abstract boolean handleMenu(int command);
}
Editor is loading...
Leave a Comment