// CSE 143, Winter 2009, Marty Stepp // Homework 7: 20 Questions /** * Interface describing abstract user interaction operations. * This interface is implemented by the graphical and text UIs for the game. * Your QuestionTree interacts with the UI through this interface. */ public interface UserInterface { public String ask(String question); public void println(String message); public boolean yesNo(String question); // various messages that are output by the user interface // (your QuestionTree does not need to refer to these messages) public static final String PLAY_AGAIN_MESSAGE = "Challenge me again?"; public static final String SAVE_MESSAGE = "Shall I remember these games?"; public static final String LOAD_MESSAGE = "Shall I recall our previous games?"; public static final String SAVE_LOAD_FILENAME_MESSAGE = "What is the file name?"; public static final String STATUS_MESSAGE = "Games played: %d\nI won: %d"; public static final String BANNER_MESSAGE = "Think of an item, and I will guess it."; }