Skip to content

Instantly share code, notes, and snippets.

@sjabiulla
Last active December 8, 2020 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjabiulla/4bdf71f81079e38aef137e64913bf26b to your computer and use it in GitHub Desktop.
Save sjabiulla/4bdf71f81079e38aef137e64913bf26b to your computer and use it in GitHub Desktop.
public class Tournament {
public boolean register(String teamName) {
if (!isAlreadyRegistered(teamName)) {
// register team
return true;
}
return false;
}
public boolean isAlreadyRegistered(String teamName) {
throw new RuntimeException("I'm not supposed to be executed");
}
public static void main(String[] args) throws Exception {
Tournament tournament = new Tournament();
tournament.register("e-LEMON-ators");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment