updater.deciders
Interface IDecider
- All Known Implementing Classes:
- ConsoleBasedDecider, GUIBasedDecider, YesDeciderStub
public interface IDecider
Abstracts interaction with a user. A decider implements two
pieces of functionality:
- The ask method presents a questions to the user. It
returns true if the user answers "yes" and
false if the user answers "no." Implementing classes
can decide how to obtain an answer to the user.
- The tell method displays a message to the user.
Implementing classes can select how the message is displayed.
ask
boolean ask(String question)
- Requires:
- Question is not null.
- Effects:
- The given question is displayed to the user.
- Returns:
- True if the user answers "yes" and false if the user answers "no."
tell
void tell(String message)
- Requires:
- Message is not null.
- Effects:
- Displays the given message to the user.