During the module OGP you created an OptionSelector in week 3. The problem with that implementation is that it only works for a simple type. To use it for another type you would have to rebuild your code.
Think what you can do with a generic type.
public class OptionSelector<T> {
public void addOption(T option);
public void printMenu(boolean showQuit);
public T selectOption();
}
Assignment
OptionSelector
class.
T
.When a quit option is shown. The choice for ‘0’ returns null
.