-
Notifications
You must be signed in to change notification settings - Fork 14
[BE] ์ด๋ํ ๐ฅ ์ค๋์ ์ง๊ฟ์? #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
75e5b9a
c4c7968
2babb5e
d137178
4cf6b38
1a91a77
a9efde8
7f4274b
79a2f14
a10611d
5c91465
12c659e
f168091
e67a4a2
91094ac
880f008
1ed6286
1d5e516
0bf22e9
f665a22
e42ab3d
c3929f0
da4b742
615d27d
ec960d5
a4bb9fd
d31a0a8
55c2bce
5ce6071
35cbe6a
1df36fd
a4a0235
539d294
21ace85
3ac6f4e
b6f2158
7199cf8
3e116b7
f4cd2e5
31a6e40
2d883e5
fcedf0c
df1c4f9
e22276c
7356307
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Leets ๋ฏธ์ 1์ฃผ์ฐจ | ||
|
|
||
| ## ๐ฅ ๋ฏธ์ - ์ค๋์ ์ง๊ฟ์? | ||
|
|
||
| ### โ ํต์ฌ ๊ธฐ๋ฅ | ||
|
|
||
| **๋ชฉํ** | ||
|
|
||
| ๋์ ์ง๊ฟ์ ์ ํด์ค ๋๋ค ์ง๊ฟ ๋งค์นญ ํ๋ก๊ทธ๋จ์ ์์ฑ | ||
|
|
||
| ### โ 1์ฃผ์ฐจ ๋ฏธ์ ๋ชฉํ | ||
|
|
||
| #### ๊ณผ์ ๋ฅผ ํตํด ์๊ฐํด๋ณด๊ธฐ | ||
| - ์ด๋ป๊ฒ ํ๋ฉด ์ฝ๋๋ฅผ ํจ์จ์ ์ผ๋ก ์งค ์ ์๋์ง | ||
| - ์ด๋ป๊ฒ ํ๋ฉด ์ ์ง ๋ณด์๊ฐ ์ฌ์ด ์ฝ๋๊ฐ ๋ ์ ์๋์ง | ||
| - ๊ฐ์ฒด์งํฅ ํ๋ก๊ทธ๋๋ฐ์ด ๋ชฉํํ๋ ๋ฐ๊ฐ ๋ฌด์์ด๊ณ ์ด๋ฅผ ์ด๋ป๊ฒ ์ฝ๋๋ก ๊ตฌํํ ์ ์๋์ง | ||
|
|
||
| ### โ ๊ตฌํํ ๊ธฐ๋ฅ ๋ชฉ๋ก | ||
| **[ Domain ]** | ||
| - | ||
|
|
||
| - [x] **Member** | ||
|
|
||
| - ์ฐธ๊ฐ์์ ๋ฐ์ดํฐ ๊ตฌ์กฐ์ ๊ด๋ จ ๋ก์ง์ ๋ด๋น | ||
| - ๋ฌธ์์ด๋ก๋ ๋ฉค๋ฒ๋ค์ ๋ฆฌ์คํธ๋ก ๋ถ๋ฆฌํ๊ณ , ์ด ๋ฉค๋ฒ์๋ฅผ ๋ฐํํฉ๋๋ค. | ||
|
|
||
| **[ Service ]** | ||
| - | ||
|
|
||
| - [x] **GroupService** | ||
| - ์ฐธ๊ฐ์๋ค์ ๊ทธ๋ฃนํํ๋ ๋ก์ง์ ๋ด๋น | ||
| - ๋๋ค ์ง๊ฟ์ ์ถ์ฒจํฉ๋๋ค. | ||
|
|
||
| **[ View ]** | ||
| - | ||
|
|
||
| - [x] **InputView** | ||
|
|
||
| - ๋ฉค๋ฒ ์ด๋ฆ์ ์ ๋ ฅ๋ฐ์ (,๋ก ๊ตฌ๋ถ) | ||
| - ์ต๋ ์ง ์๋ฅผ ์ ๋ ฅ๋ฐ์ | ||
| - ๋ค์ ๊ตฌ์ฑํ ์ง ๋ง์ง ์ ๋ ฅ๋ฐ์(y,n) | ||
|
|
||
| - [x] **OutputView** | ||
| - ์ง ์ถ์ฒ ๊ฒฐ๊ณผ๋ฅผ ๋ณด์ฌ์ค(default, y) | ||
| - ์ธ์ฌ ๋ฉ์ธ์ง๋ฅผ ๋ณด์ฌ์ค(n) | ||
|
|
||
| **[ Controller ]** | ||
| - | ||
|
|
||
| - [x] **MatchingController** | ||
| ์ง๊ถ ์ถ์ฒ ์์ฒญ์ ์ฒ๋ฆฌํ๋ ๋ก์ง์ ๊ตฌํ | ||
|
|
||
| ### โ ์์ธ ์ฒ๋ฆฌ - exception | ||
|
|
||
| ********๊ณตํต******** | ||
|
|
||
| - [x] ์์ธ ์ํฉ ์ ์๋ฌ ๋ฌธ๊ตฌ๋ฅผ ์ถ๋ ฅ. ๋จ, ์๋ฌ ๋ฌธ๊ตฌ๋ "[ERROR]"๋ก ์์ | ||
|
|
||
| --- | ||
|
|
||
| **์ด๋ฆ ์ ๋ ฅ** | ||
|
|
||
| - [x] ์ด๋ฆ์ด ํ๊ธ์ด ์๋๋ฉด ์์ธ์ฒ๋ฆฌ | ||
|
|
||
| --- | ||
|
|
||
| **์ต๋ ์ง์ ์ ๋ ฅ** | ||
|
|
||
| - [x] ์ต๋ ์ง ์๊ฐ ์ด๋ฆ์ ๊ฐฏ์๋ณด๋ค ํฌ๋ฉด ์์ธ์ฒ๋ฆฌ | ||
| --- | ||
|
|
||
| **retry ์ ๋ ฅ** | ||
| - [x] y์ n ์ด์ธ์ ์ซ์๋ฉด ์์ธ์ฒ๋ฆฌ | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,10 @@ | ||
| package leets.leets_mate; | ||
|
|
||
| import java.util.*; | ||
| import leets.leets_mate.controller.MatchingController; | ||
|
|
||
| public class LeetsMateApplication { | ||
|
|
||
| // ๋์ ํจ์์ ๋๋ค. | ||
| public void run() { | ||
| } | ||
|
|
||
| // ๋ฌธ์์ด๋ก๋ ๋ฉค๋ฒ๋ค์ ๋ฆฌ์คํธ๋ก ๋ถ๋ฆฌํ๋ ํจ์์ ๋๋ค. | ||
| public List<String> parseMembers(String members) { | ||
| return new ArrayList<>(); | ||
| } | ||
|
|
||
| // ์ด ๋ฉค๋ฒ์๋ฅผ ๋ฐํํฉ๋๋ค. | ||
| public int memberNumber(List<String> members) { | ||
| return 0; | ||
| } | ||
|
|
||
| // ๋ฉค๋ฒ ๋ฌธ์์ด์ ์์ด๊ฐ ์๋์ง ๊ฒ์ฌํฉ๋๋ค. ์์ด๊ฐ ์๋ค๋ฉด ์์ธ ์ถ๋ ฅ | ||
| public void checkHasNoEnglish(String members) { | ||
| } | ||
|
|
||
| // ๋ฉค๋ฒ์์ ์ต๋ ์ง์ ๋ฐ์ดํฐ๊ฐ ์ ํจํ์ง ๊ฒ์ฌํ๋ ํจ์์ ๋๋ค. ์ ํจํ์ง ์๋ค๋ฉด ์์ธ ์ถ๋ ฅ | ||
| public void checkDataValidity(int memberCount, int maximumGroupSize) { | ||
| } | ||
|
|
||
| // ๋๋ค ์ง๊ฟ ์ถ์ฒจํ๋ ํจ์ ์ ๋๋ค. | ||
| public List<List<String>> generateRandomGroups(List<String> memberList, int maximumGroupSize) { | ||
| return new ArrayList<>(); | ||
| } | ||
|
|
||
| // ๊ฒฐ๊ณผ๋ฅผ ํ๋ฆฐํธ ํ๋ ํจ์์ ๋๋ค. | ||
| public void printResult(List<List<String>> result) { | ||
| } | ||
|
|
||
| public static void main(String[] args) { | ||
| LeetsMateApplication app = new LeetsMateApplication(); | ||
| app.run(); | ||
| MatchingController controller = new MatchingController(); | ||
| controller.run(); | ||
| } | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||
| package leets.leets_mate.controller; | ||||||
|
|
||||||
| import leets.leets_mate.domain.Member; | ||||||
| import leets.leets_mate.service.GroupService; | ||||||
| import leets.leets_mate.view.InputView; | ||||||
| import leets.leets_mate.view.OutputView; | ||||||
|
|
||||||
| import java.util.List; | ||||||
|
|
||||||
| public class MatchingController { | ||||||
| GroupService groupService = new GroupService(); | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. default๋ก ๋ ์ด์ ๊ฐ ์์๊น์? |
||||||
|
|
||||||
| public void run() { | ||||||
| String[] members = InputView.readMember(); | ||||||
| int maxGroupSize = InputView.readMaxGroup(members); | ||||||
|
|
||||||
| List<Member> membersOfList = Member.parseMembers(members); | ||||||
|
|
||||||
| boolean retry = true; | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์ฒ์ ํ ๋๋ retry๋ผ๊ณ ํ๋๋ฐ ์๋ฏธ๊ฐ ์ ์๋ง๋๊ฑฐ ๊ฐ์ต๋๋ค. isDone๊ฐ์๊ฑด ์ด๋จ๊น์? ๊ทธ๋ฌ๋ฉด while(!isDone) ์ด๋ ๊ฒ ํด์ผํ๋๋ฐ ์์ฐ ๋๋๋ ์กฐ๊ฑด์ผ๋ก !๋ค์ด๊ฐ๋๊ฒ ์ซ๋ค๊ณ ํ๋ค์. ๊ทธ๋ผ isContinue ๋ก ํ๋ฉด ๋๋ค๊ณ ํด์! booleanํ์ ์ด๋๊น ๋ณ์๋ช ์์ is๊ฐ ๋ถ์ผ๋ฉด ๋ ์ฝ๊ธฐ ์ฌ์ธ๊ฑฐ ๊ฐ์์ |
||||||
| while (retry) { | ||||||
| List<List<Member>> groupsOfList = groupService.generateRandomGroups(membersOfList, maxGroupSize); | ||||||
|
|
||||||
| OutputView.printResult(groupsOfList); | ||||||
| OutputView.printCompletionMessage(); | ||||||
|
|
||||||
| OutputView.printCanYouRetry(); | ||||||
| retry = InputView.readRetry(); | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. readRetryOpinion ์ ์ด๋จ๊น์? ์ฌ์๋์ ๋ ฅ ์ด๋ผ๋ ๋ป์ด ํจ์์ ๊ธฐ๋ฅ์ ์ ์ค๋ช ์ํด์ฃผ๋๊ฑฐ ๊ฐ์์ |
||||||
|
|
||||||
| if (retry == true) { | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
๋น๊ตํ ์ด์ ๊ฐ ์๋์? |
||||||
| OutputView.printLine(); | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| OutputView.printDontWantRetry(); | ||||||
| } | ||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| package leets.leets_mate.domain; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
|
|
||
| public class Member { | ||
| private String name; | ||
|
|
||
| public Member(String name) { | ||
| this.name = name; | ||
| } | ||
|
|
||
| public static List<Member> parseMembers(String[] memberName) { | ||
| List<Member> members = new ArrayList<>(); | ||
| for (String name : memberName) { | ||
| members.add(new Member(name)); | ||
| } | ||
|
|
||
| return members; | ||
| } | ||
|
|
||
| public static int memberNumber(List<Member> members) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. static ์ธ ์ด์ ๊ฐ ๊ถ๊ธํ๋ค์ |
||
| return members.size(); | ||
| } | ||
|
|
||
| public String getName() { | ||
| return name; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| package leets.leets_mate.service; | ||
|
|
||
| import leets.leets_mate.domain.Member; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.Collections; | ||
| import java.util.List; | ||
|
|
||
| public class GroupService { | ||
| public List<List<Member>> generateRandomGroups(List<Member> memberList, int maximumGroupSize) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GPT๊ฐ ๊ฐ์ ํ ์ฝ๋์ ๋๋ค. ์ฐธ๊ณ ํ์๋ฉด ์ข์๊ฑฐ ๊ฐ์ต๋๋ค! |
||
| Collections.shuffle(memberList); | ||
|
|
||
| List<List<Member>> groups = new ArrayList<>(); | ||
| List<Member> group = new ArrayList<>(); | ||
|
|
||
| for (Member member : memberList) { | ||
| group.add(member); | ||
|
|
||
| if (group.size() == maximumGroupSize) { | ||
| groups.add(new ArrayList<>(group)); | ||
| group.clear(); | ||
| } | ||
| } | ||
|
|
||
| // ํ์ฌ๋ก์จ๋ ๋น ๊ทธ๋ฃน์ด ์ถ๊ฐ๋ ๊ฐ๋ฅ์ฑ์ด ๋ณด์ด์ง ์๊ธดํ๋, ํน์ ๋ชจ๋ฅผ ๋น ๊ทธ๋ฃน ์ถ๊ฐ ๋ฐฉ์ง | ||
| if (!group.isEmpty()) { | ||
| groups.add(group); | ||
| } | ||
|
|
||
| return groups; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| package leets.leets_mate.view; | ||
|
|
||
| import leets.leets_mate.view.exception.IllegalArgumentExceptionType; | ||
|
|
||
| import java.util.InputMismatchException; | ||
| import java.util.Scanner; | ||
| import java.util.regex.Pattern; | ||
|
|
||
| public class InputView { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๋ชจ๋ ๋ฉ์๋๊ฐ static์ด๋ค์. ๊ทธ๋ผ InputView๋ ๊ฐ์ฒด์ค๋ฝ๊ฒ ์ผํ๊ณ ์๋์? |
||
| private static final Scanner kb = new Scanner(System.in); | ||
|
|
||
| private InputView() { | ||
| } | ||
|
|
||
| public static InputView create() { | ||
| return new InputView(); | ||
| } | ||
|
|
||
| public static String[] readMember() { | ||
| OutputView.printStartMessage(); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| try { | ||
| String input = kb.nextLine(); | ||
| String[] members = input.split(","); | ||
| for (String member : members) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๋ฌธ์์ด ๋ถ๋ฆฌํ๊ธฐ ์ ์ ๊ฒ์ฌํ๋ฉด ๋ฐ๋ณต ํ์์์ด ํ๋ฒ๋ง ํ ์ ์์๊ฑฐ ๊ฐ์ต๋๋ค |
||
| checkHasNoEnglish(member); | ||
| } | ||
| return members; | ||
| } | ||
| catch (IllegalArgumentException e) { | ||
| System.out.println(e.getMessage()); // ์ถํ ์ด๋ถ๋ถ์ enum์ผ๋ก ๋์๋ฆฌ ๋ถ์๋ฅผ ๊ด๋ฆฌํ์ ๋ ์๋ ๋์๋ฆฌ ๋ถ์์ ์ ๋ ฅํ๋ฉด ์๋ฌ๋ฉ์์ง ์ถ๋ ฅ๋ ํ๋๋ก ๊ตฌํ | ||
| return readMember(); | ||
| } | ||
| } | ||
|
|
||
| public static int readMaxGroup(String[] members) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์ฝ๋๋ค๋ ํจ์์ธ๋ฐ, ์์์ ์ถ๋ ฅ๋ ํ๋ค์! ๋ถ๋ฆฌ ํ ์๋ ์์์๊น์? |
||
| OutputView.printMaxGroup(); | ||
| try { | ||
| int memberCount = members.length; | ||
| int maximumGroupSize = kb.nextInt(); | ||
| kb.nextLine(); | ||
|
|
||
| checkDataValidity(memberCount, maximumGroupSize); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
View๊ฐ ์ต๋ ์ง ์์ ๋ํ ์กฐ๊ฑด๊ณผ ๋ฉค๋ฒ ์๋ฅผ ์๊ณ ์๋ ๊ฑฐ ๊ฐ์์. InputView๋ ๊ฒ์ฆ์ ํ๋ ๊ฐ์ฒด์ธ๊ฐ์? |
||
|
|
||
| System.out.println(); | ||
| return maximumGroupSize; | ||
| } catch (InputMismatchException e) { | ||
| System.out.println(IllegalArgumentExceptionType.INVALID_MAX_GROUP.getMessage()); | ||
| kb.nextLine(); | ||
| return readMaxGroup((members)); | ||
| } catch (IllegalArgumentException e){ | ||
| System.out.println(e.getMessage()); | ||
| return readMaxGroup(members); | ||
| } | ||
| } | ||
|
|
||
| public static void checkHasNoEnglish(String member) { | ||
| // Character.isAlphabetic()์ ์์ด์ธ์ง ๊ตฌ๋ณํด์ฃผ๋๊ฒ ์๋ ์ซ์์ ๋ฌธ์๋ฅผ ๊ตฌ๋ถํด์ค๋ค! | ||
| // for(char c : member.toCharArray()) { | ||
| // if (Character.isAlphabetic(c)) { | ||
| // throw IllegalArgumentExceptionType.INVALID_NAMING.getException(); | ||
| // } | ||
| // } | ||
| if (Pattern.matches(".*[a-zA-Z]+.*", member)) { | ||
| throw IllegalArgumentExceptionType.INVALID_NAMING.getException(); | ||
| } | ||
| } | ||
|
|
||
| public static void checkDataValidity(int memberCount, int maximumGroupSize) { | ||
| if (memberCount < maximumGroupSize) { | ||
| throw IllegalArgumentExceptionType.GROUP_SIZE_EXCEEDS_MEMBER_COUNT.getException(); | ||
| } | ||
| } | ||
|
|
||
| public static boolean readRetry() { | ||
| try { | ||
| char c = kb.next().charAt(0); | ||
| if (c == 'y') { | ||
| return true; | ||
| } else if (c == 'n') { | ||
| return false; | ||
|
Comment on lines
+77
to
+80
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yellow๋ฅผ ์ ๋ ฅํด๋ ์ฌ๋งค์นญํด์ค ๊ฒ ๊ฐ์์ |
||
| } else | ||
| throw IllegalArgumentExceptionType.INVALID_RETRY_INPUT.getException(); | ||
| } catch (IllegalArgumentException e) { | ||
| System.out.println(e.getMessage()); | ||
| return readRetry(); | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| package leets.leets_mate.view; | ||
|
|
||
| import leets.leets_mate.domain.Member; | ||
|
|
||
| import java.util.List; | ||
| import java.util.stream.Collectors; | ||
|
|
||
| public class OutputView { | ||
| public static void printStartMessage() { | ||
| System.out.println("[Leets ์ค๋์ ์ง์๊ฒ]๋ฅผ ์์ํฉ๋๋ค."); | ||
| System.out.println(); | ||
| System.out.println("๋ฉค๋ฒ์ ์ด๋ฆ์ ์ ๋ ฅํด ์ฃผ์ธ์. (, ๋ก ๊ตฌ๋ถ)"); | ||
| } | ||
|
|
||
| public static void printMaxGroup() { | ||
| System.out.println(); | ||
| System.out.println("์ต๋ ์ง ์๋ฅผ ์ ๋ ฅํด ์ฃผ์ธ์."); | ||
| } | ||
|
|
||
| public static void printResult(List<List<Member>> result) { | ||
| System.out.println("์ค๋์ ์ง ์ถ์ฒ ๊ฒฐ๊ณผ์ ๋๋ค."); | ||
| for (List<Member> group : result) { | ||
|
|
||
| List<String> memberNames = group.stream() | ||
| .map(Member::getName) | ||
| .collect(Collectors.toList()); | ||
| String groupResult = String.join(" | ", memberNames); | ||
|
|
||
| System.out.println("[ " + groupResult + " ]"); | ||
| } | ||
| } | ||
|
|
||
| public static void printCompletionMessage() { | ||
| System.out.println(); | ||
| System.out.println("์ถ์ฒ์ ์๋ฃํ์ต๋๋ค."); | ||
| } | ||
|
|
||
| public static void printCanYouRetry() { | ||
| System.out.print("๋ค์ ๊ตฌ์ฑํ์๊ฒ ์ต๋๊น? (y or n): "); | ||
| } | ||
|
|
||
| public static void printLine() { | ||
| System.out.println("--------------------------------"); | ||
| } | ||
|
|
||
| public static void printDontWantRetry() { | ||
| System.out.println("์๋ฆฌ๋ฅผ ์ด๋ํด ์๋ก์๊ฒ ์ธ์ฌํด์ฃผ์ธ์."); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package leets.leets_mate.view.exception; | ||
|
|
||
| public interface ExceptionType<T> { | ||
| String getMessage(); | ||
|
|
||
| T getException(); | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๐ |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package leets.leets_mate.view.exception; | ||
|
|
||
| public enum IllegalArgumentExceptionType implements ExceptionType<IllegalArgumentException> { | ||
|
|
||
| INVALID_NAMING("[ERROR] ์ด๋ฆ์ ํ๊ธ๋ก ์ ๋ ฅํด์ผ ํฉ๋๋ค"), | ||
| GROUP_SIZE_EXCEEDS_MEMBER_COUNT("[ERROR] ์ต๋ ์ง ์๋ ์ด๋ฆ์ ๊ฐฏ์๋ณด๋ค ํด ์ ์์ต๋๋ค."), | ||
| INVALID_MAX_GROUP("[ERROR] ์ต๋ ์ง์๋ ์ซ์๋ก ์ ๋ ฅํด์ผ ํฉ๋๋ค"), | ||
| INVALID_RETRY_INPUT("[ERROR] y์ n๋ง ์ ๋ ฅ์ด ๊ฐ๋ฅํฉ๋๋ค."); | ||
|
|
||
| private final String message; | ||
|
|
||
| IllegalArgumentExceptionType(String message) { | ||
| this.message = message; | ||
| } | ||
|
|
||
| @Override | ||
| public String getMessage() { | ||
| return message; | ||
| } | ||
|
|
||
| @Override | ||
| public IllegalArgumentException getException() { | ||
| return new IllegalArgumentException(getMessage()); | ||
| } | ||
| } |

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฒดํฌ๋ฆฌ์คํธ๋ฅผ ํตํด TODO๋ฅผ ๊ด๋ฆฌํ๋ ํธ์ด ์ ๋ง ์ข์ ๊ฒ ๊ฐ์์!