Repository navigation
submit step3 1st #88
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
Merged
Merged
submit step3 1st #88
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,21 +19,20 @@ public static void drawVertical(List<Point> points) { | |
| System.out.printf(THREE_STRING, VERTICAL); | ||
| drawDotSpace(y, points); | ||
| System.out.println(); | ||
|
|
||
| } | ||
| } | ||
|
|
||
| private static void drawDotSpace(int y, List<Point> points) { | ||
| for (int x = 1; x <= AXIS_MAX * ROW.length(); x++) { | ||
| if(drawDot(y, points, x)) | ||
| if (drawDot(y, points, x)) | ||
| System.out.print(BLANK); | ||
| } | ||
| } | ||
|
|
||
| private static Boolean drawDot(int y, List<Point> points, int x) { | ||
| String dot = "●"; | ||
| for (Point point : points) { | ||
| if(point.isY(y) && point.isX(x)) { | ||
| if (point.isY(y) && point.isX(x)) { | ||
|
Contributor
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. point.matchPoint(x, y);로 구현하는 것은 어떨까? |
||
| System.out.print(dot); | ||
| return false; | ||
| } | ||
|
|
@@ -58,8 +57,16 @@ public static void rowNumber() { | |
| System.out.println(); | ||
| } | ||
|
|
||
| public static void printLength(double lineLength) { | ||
| public static void printLength() { | ||
| System.out.print("두 점 사이 거리는 "); | ||
| System.out.println(lineLength); | ||
| } | ||
|
|
||
| public static void printCube() { | ||
| System.out.print("사각형의 넓이는 "); | ||
| } | ||
|
|
||
| public static void dotCountReWrite() { | ||
| System.out.println("직사각형이 아니거나 점의 개수는 2개혹은 4개 이어야 합니다."); | ||
| } | ||
|
|
||
| } | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| package coordinatetest; | ||
|
|
||
| import org.junit.Test; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
|
|
||
| public class CoordinateLineTest { | ||
| @Test | ||
| public void isIntegerTest() { | ||
| int a = 4; | ||
| double b = Math.sqrt(16); | ||
| if (a == (int) b) | ||
| System.out.println("트루"); | ||
| System.out.println("거짓"); | ||
| System.out.println((int) Math.sqrt(16)); | ||
| } | ||
|
|
||
| @Test | ||
| public void twoArrayListCompare() { | ||
| List<Double> list1 = new ArrayList<>(); | ||
| List<Double> list2 = new ArrayList<>(); | ||
|
|
||
| list1.add(1.0); | ||
| list1.add(2.0); | ||
| list1.add(3.0); | ||
| list1.add(4.0); | ||
|
Contributor
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. Arrays.asList()를 사용하면 좀 더 깔끔하게 구현할 수 있음. |
||
|
|
||
| list2.add(1.0); | ||
| list2.add(2.0); | ||
| list2.add(3.0); | ||
| list2.add(4.0); | ||
|
|
||
| for (int i = 0; i < list1.size(); i++) { | ||
| if (list1.get(i).equals(list2.get(i))) //제네릭이 Integer일때는 == 로 비교 가능하나 Double때는 equals로 비교가능함. | ||
| System.out.println(i + "번째 요소가 각각 같습니다."); | ||
| } | ||
| } | ||
|
|
||
|
|
||
| } | ||
File renamed without changes.
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
메소드 이름 소문자???