Last active
December 8, 2020 15:59
-
-
Save sjabiulla/4bdf71f81079e38aef137e64913bf26b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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