private void service() { String[] command = null; MenuControl menuControl = null; do { System.out.print("명령> "); command = scanner.nextLine().split(" "); if (command[0].equals("menu")) { if (command.length == 1) { doMenu(); } else { menuControl = menuControlMap.get(command[1]); if (menuControl != null) { menuControl.service(); } else { System.out.println("해당 메뉴가 없습니다."); } } } else if (command[0].equals("help")) { doHelp(); } else if (command[0].equals("quit")) { doQuit(); } else { System.out.println("해당 명령을 지원하지 않습니다."); } } while (!command[0].equals("quit")); System.out.println("안녕히가세요!"); scanner.close(); }
public void hideMenu() { super.hideMenu(); screenPos = null; }