From 18f2f0bd1a10c856784252376d3b0ff7a80f0217 Mon Sep 17 00:00:00 2001 From: HEUKWU Date: Wed, 18 Jan 2023 14:43:01 +0900 Subject: [PATCH 1/7] =?UTF-8?q?=EC=9C=A0=EC=98=81=EC=9A=B0(yuyeongwoo)=20R?= =?UTF-8?q?eport1,=20Report2=20=EA=B3=BC=EC=A0=9C=20=EC=A0=9C=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/yuyeongwoo/report1/Report1_1 | 3 +++ src/yuyeongwoo/report1/Report1_2 | 3 +++ src/yuyeongwoo/report1/Report1_3.java | 21 +++++++++++++++++++ src/yuyeongwoo/report2/Report2_1 | 4 ++++ src/yuyeongwoo/report2/Report2_2.java | 30 +++++++++++++++++++++++++++ src/yuyeongwoo/report2/Report2_3.java | 9 ++++++++ src/yuyeongwoo/report2/Report2_4.java | 11 ++++++++++ src/yuyeongwoo/report2/Report2_5.java | 9 ++++++++ src/yuyeongwoo/report2/Report2_6.java | 12 +++++++++++ 9 files changed, 102 insertions(+) create mode 100644 src/yuyeongwoo/report1/Report1_1 create mode 100644 src/yuyeongwoo/report1/Report1_2 create mode 100644 src/yuyeongwoo/report1/Report1_3.java create mode 100644 src/yuyeongwoo/report2/Report2_1 create mode 100644 src/yuyeongwoo/report2/Report2_2.java create mode 100644 src/yuyeongwoo/report2/Report2_3.java create mode 100644 src/yuyeongwoo/report2/Report2_4.java create mode 100644 src/yuyeongwoo/report2/Report2_5.java create mode 100644 src/yuyeongwoo/report2/Report2_6.java diff --git a/src/yuyeongwoo/report1/Report1_1 b/src/yuyeongwoo/report1/Report1_1 new file mode 100644 index 0000000..446a94c --- /dev/null +++ b/src/yuyeongwoo/report1/Report1_1 @@ -0,0 +1,3 @@ +2-4번 문제 + +정답 : a, b, c, d diff --git a/src/yuyeongwoo/report1/Report1_2 b/src/yuyeongwoo/report1/Report1_2 new file mode 100644 index 0000000..a2577fc --- /dev/null +++ b/src/yuyeongwoo/report1/Report1_2 @@ -0,0 +1,3 @@ +2-7번 문제 + +정답 : 12, true, 131, 51, 99, Java, 오류 \ No newline at end of file diff --git a/src/yuyeongwoo/report1/Report1_3.java b/src/yuyeongwoo/report1/Report1_3.java new file mode 100644 index 0000000..930b0ac --- /dev/null +++ b/src/yuyeongwoo/report1/Report1_3.java @@ -0,0 +1,21 @@ +package yuyeongwoo.report1; +// 2-8 번 문제 +public class Report1_3 { + public static void main(String[] args) { + int x = 1; + int y = 2; + int z = 3; + + // 정답 작성 + int a = x; + x = y; + y = z; + z = a; + // + + System.out.println("x = " + x); + System.out.println("y = " + y); + System.out.println("z = " + z); + } +} + diff --git a/src/yuyeongwoo/report2/Report2_1 b/src/yuyeongwoo/report2/Report2_1 new file mode 100644 index 0000000..4984b96 --- /dev/null +++ b/src/yuyeongwoo/report2/Report2_1 @@ -0,0 +1,4 @@ +3-1번 문제 + +정답: d, e + diff --git a/src/yuyeongwoo/report2/Report2_2.java b/src/yuyeongwoo/report2/Report2_2.java new file mode 100644 index 0000000..4ee5d8b --- /dev/null +++ b/src/yuyeongwoo/report2/Report2_2.java @@ -0,0 +1,30 @@ +package yuyeongwoo.report2; +// 3-2번 문제 +public class Report2_2 { + public static void main(String[] args) { + int x = 2; + int y = 5; + char c = 'A'; // 'A'의 문자코드는 65 + + System.out.println(y >= 5 || x < 0 && x > 2); + //결과: true, 이유: true || false && false 가 되고, && 연산자의 우선순위가 더 높기 때문에 true || false 가 된다. 따라서 true가 나온다. + System.out.println(y += 10 - x++); + //결과: 13, 이유: 위 식을 풀어쓰게 되면, y = y + 10 - x++ 가 된다. x는 후위형이기 때문에 값이 증가하지 않은 상태에서 식이 계산된다. 따라서 y = 5 + 10 - 2 -> y = 13 + System.out.println(x += 2); + //결과: 5, 이유: 이전 식에서 x의 값이 1증가했기 때문에 x = 3 + 2가 되어 x는 5가 된다. + System.out.println(!('A' <= c && c <= 'Z')); + //결과: false, 이유: c는 A와 Z사이에 존재하는 대문자이기 때문에 참이 된다. 하지만 논리부전연산자에 의해 false가 된다. + System.out.println('C' - c); + //결과: 2, 이유: 'C' 와 'A'는 정수로 변환되어 각 67, 65가 되고 따라서 67 - 65 = 2가 된다. + System.out.println('5' - '0'); + //결과: 5, 이유: 위와 같은 이유로 53 - 48이 되어 5가 답이다. + System.out.println(c + 1); + //결과: 66, 'A'가 정수 65로 변환되고 65 + 1 = 66이 된다. + System.out.println(++c); + //결과: B, 이유: 'A'의 문자코드 값이 1증가되고, 66이 된다. 문자코드 66에 해당하는 문자 B를 출력한다. + System.out.println(c++); + //결과: B, 이유: 후위형이기 때문에 위에서 증가된 값 B가 출력되고 1증가한다. + System.out.println(c); + //결과: C, 이유: 위에서 1증가했기 때문에 문자코드 67에 해당하는 C가 출력된다. + } +} diff --git a/src/yuyeongwoo/report2/Report2_3.java b/src/yuyeongwoo/report2/Report2_3.java new file mode 100644 index 0000000..fcec592 --- /dev/null +++ b/src/yuyeongwoo/report2/Report2_3.java @@ -0,0 +1,9 @@ +package yuyeongwoo.report2; +// 3-3번 문제 +public class Report2_3 { + public static void main(String[] args) { + int num = 456; + //정답 + System.out.println(num / 100 * 100); + } +} diff --git a/src/yuyeongwoo/report2/Report2_4.java b/src/yuyeongwoo/report2/Report2_4.java new file mode 100644 index 0000000..0639583 --- /dev/null +++ b/src/yuyeongwoo/report2/Report2_4.java @@ -0,0 +1,11 @@ +package yuyeongwoo.report2; +// 3-4번 문제 +public class Report2_4 { + public static void main(String[] args) { + int numOfApples = 123; + int sizeOfBucket = 10; + //정답 + int numOfbucket = numOfApples / sizeOfBucket + (numOfApples % 10 > 0 ? 1 : 0); + System.out.println("필요한 바구니의 수 : " + numOfbucket); + } +} diff --git a/src/yuyeongwoo/report2/Report2_5.java b/src/yuyeongwoo/report2/Report2_5.java new file mode 100644 index 0000000..dc6b02e --- /dev/null +++ b/src/yuyeongwoo/report2/Report2_5.java @@ -0,0 +1,9 @@ +package yuyeongwoo.report2; +// 3-5번 문제 +public class Report2_5 { + public static void main(String[] args) { + int num = 10; + //정답 + System.out.println(num > 0 ? "양수" : num < 0 ? "음수" : "0"); + } +} diff --git a/src/yuyeongwoo/report2/Report2_6.java b/src/yuyeongwoo/report2/Report2_6.java new file mode 100644 index 0000000..c6a58b3 --- /dev/null +++ b/src/yuyeongwoo/report2/Report2_6.java @@ -0,0 +1,12 @@ +package yuyeongwoo.report2; +// 3-6번 문제 +public class Report2_6 { + public static void main(String[] args) { + int fahrenheit = 100; + //정답 + float celcius = (int) (5 / 9f * (fahrenheit - 32) * 100 + 0.5) / 100f ; + + System.out.println("fahrenheit = " + fahrenheit); + System.out.println("celcius = " + celcius); + } +} From f9533d3ffd147c766aca7c75f3b643413be5e77f Mon Sep 17 00:00:00 2001 From: HEUKWU Date: Thu, 19 Jan 2023 13:33:12 +0900 Subject: [PATCH 2/7] =?UTF-8?q?=EC=9C=A0=EC=98=81=EC=9A=B0(yuyeongwoo)=20R?= =?UTF-8?q?eport3,=20Report4=20=EA=B3=BC=EC=A0=9C=20=EC=A0=9C=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/yuyeongwoo/report3/Report3_1 | 26 ++++++++++++++++++++ src/yuyeongwoo/report3/Report3_10.java | 28 +++++++++++++++++++++ src/yuyeongwoo/report3/Report3_2.java | 14 +++++++++++ src/yuyeongwoo/report3/Report3_3.java | 14 +++++++++++ src/yuyeongwoo/report3/Report3_4.java | 19 ++++++++++++++ src/yuyeongwoo/report3/Report3_5.java | 16 ++++++++++++ src/yuyeongwoo/report3/Report3_6.java | 13 ++++++++++ src/yuyeongwoo/report3/Report3_7.java | 14 +++++++++++ src/yuyeongwoo/report3/Report3_8.java | 8 ++++++ src/yuyeongwoo/report3/Report3_9.java | 13 ++++++++++ src/yuyeongwoo/report4/Report4_1 | 4 +++ src/yuyeongwoo/report4/Report4_2 | 3 +++ src/yuyeongwoo/report4/Report4_3.java | 12 +++++++++ src/yuyeongwoo/report4/Report4_4.java | 23 +++++++++++++++++ src/yuyeongwoo/report4/Report4_5.java | 30 +++++++++++++++++++++++ src/yuyeongwoo/report4/Report4_6.java | 34 ++++++++++++++++++++++++++ 16 files changed, 271 insertions(+) create mode 100644 src/yuyeongwoo/report3/Report3_1 create mode 100644 src/yuyeongwoo/report3/Report3_10.java create mode 100644 src/yuyeongwoo/report3/Report3_2.java create mode 100644 src/yuyeongwoo/report3/Report3_3.java create mode 100644 src/yuyeongwoo/report3/Report3_4.java create mode 100644 src/yuyeongwoo/report3/Report3_5.java create mode 100644 src/yuyeongwoo/report3/Report3_6.java create mode 100644 src/yuyeongwoo/report3/Report3_7.java create mode 100644 src/yuyeongwoo/report3/Report3_8.java create mode 100644 src/yuyeongwoo/report3/Report3_9.java create mode 100644 src/yuyeongwoo/report4/Report4_1 create mode 100644 src/yuyeongwoo/report4/Report4_2 create mode 100644 src/yuyeongwoo/report4/Report4_3.java create mode 100644 src/yuyeongwoo/report4/Report4_4.java create mode 100644 src/yuyeongwoo/report4/Report4_5.java create mode 100644 src/yuyeongwoo/report4/Report4_6.java diff --git a/src/yuyeongwoo/report3/Report3_1 b/src/yuyeongwoo/report3/Report3_1 new file mode 100644 index 0000000..a35a2c3 --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_1 @@ -0,0 +1,26 @@ +4-1번 문제 + +정답 : +//int형 변수 x가 10보다 크고 20보다 작을 때 true인 조건식 +- 10 < x && x < 20 + +//char형 변수 ch가 공백이나 탭이 아닐 때 true인 조건식 +- !(ch == ' ' || ch == \t) + +//char형 변수 ch가 'x' 또는 'X'일 때 true인 조건식 +- ch == 'x' || ch == 'X' + +//char형 변수 ch가 숫자('0'~'9')일 때 true인 조건식 +- '0' <= ch && ch <= '9' + +//char형 변수 ch가 영문자(대문자 또는 소문자)일 때 true인 조건식 +- ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') + +//int형 변수 year가 400으로 나눠떨어지거나 또는 4로 나눠떨어지고 100으로 나눠떨어지지 않을때 true인 조건식 +- year % 400 == 0 || year % 4 == 0 && year % 100 != 0 + +//boolean형 변수 powerOn이 false일 때 true인 조건식 +- !powerOn + +//문자열 참조변수 str이 "yes"일 때 true인 조건식 +- str.equals("yes") diff --git a/src/yuyeongwoo/report3/Report3_10.java b/src/yuyeongwoo/report3/Report3_10.java new file mode 100644 index 0000000..3a0b3f3 --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_10.java @@ -0,0 +1,28 @@ +package yuyeongwoo.report3; + +import java.util.Scanner; + +// 4-10번 문제 +public class Report3_10 { + public static void main(String[] args) { + int answer = (int) (Math.random() * 100) + 1; + int input = 0; + int count = 0; + + Scanner s = new Scanner(System.in); + do { + count++; + System.out.print("1과 100사이의 값을 입력하세요. : "); + input = s.nextInt(); + if (answer > input) { + System.out.println("더 큰 수를 입력하세요."); + } else if (answer < input) { + System.out.println("더 작은 수를 입력하세요."); + } else { + System.out.println("맞혔습니다."); + System.out.println("시도횟수는 " + count + "번 입니다."); + break; + } + } while (true); + } +} diff --git a/src/yuyeongwoo/report3/Report3_2.java b/src/yuyeongwoo/report3/Report3_2.java new file mode 100644 index 0000000..770a11b --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_2.java @@ -0,0 +1,14 @@ +package yuyeongwoo.report3; +// 4-2번 문제 +public class Report3_2 { + public static void main(String[] args) { + int sum = 0; + //정답 + for (int i = 1; i < 20; i++) { + if (!(i % 2 == 0 || i % 3 == 0)) { + sum += i; + } + } + System.out.println("sum = " + sum); + } +} diff --git a/src/yuyeongwoo/report3/Report3_3.java b/src/yuyeongwoo/report3/Report3_3.java new file mode 100644 index 0000000..54c77df --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_3.java @@ -0,0 +1,14 @@ +package yuyeongwoo.report3; +// 4-3번 문제 +public class Report3_3 { + public static void main(String[] args) { + int sum = 0; + int totalSum = 0; + //정답 + for (int i = 1; i <= 10; i++) { + sum += i; + totalSum += sum; + } + System.out.println("totalSum = " + totalSum); + } +} diff --git a/src/yuyeongwoo/report3/Report3_4.java b/src/yuyeongwoo/report3/Report3_4.java new file mode 100644 index 0000000..148acff --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_4.java @@ -0,0 +1,19 @@ +package yuyeongwoo.report3; +// 4-4번 문제 +public class Report3_4 { + public static void main(String[] args) { + int sum = 0; + int s = 1; + int num = 0; + for (int i = 1; true; i++) { + sum += i * s; + if (sum >= 100) { + num = i * s; + break; + } + s = -s; + } + System.out.println("num = " + num); + System.out.println("sum = " + sum); + } +} diff --git a/src/yuyeongwoo/report3/Report3_5.java b/src/yuyeongwoo/report3/Report3_5.java new file mode 100644 index 0000000..7f2293a --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_5.java @@ -0,0 +1,16 @@ +package yuyeongwoo.report3; +// 4-5번 문제 +public class Report3_5 { + public static void main(String[] args) { + int i = 0; + while (i <= 10) { + int j = 0; + while (j <= i) { + System.out.print("*"); + j++; + } + System.out.println(); + i++; + } + } +} diff --git a/src/yuyeongwoo/report3/Report3_6.java b/src/yuyeongwoo/report3/Report3_6.java new file mode 100644 index 0000000..5f186cb --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_6.java @@ -0,0 +1,13 @@ +package yuyeongwoo.report3; +// 4-6번 문제 +public class Report3_6 { + public static void main(String[] args) { + for (int i = 1; i <= 6; i++) { + for (int j = 1; j <= 6; j++) { + if (i + j == 6) { + System.out.println(i + " + " + j + " = " + (i + j)); + } + } + } + } +} diff --git a/src/yuyeongwoo/report3/Report3_7.java b/src/yuyeongwoo/report3/Report3_7.java new file mode 100644 index 0000000..e9669b2 --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_7.java @@ -0,0 +1,14 @@ +package yuyeongwoo.report3; +// 4-7번 문제 +public class Report3_7 { + public static void main(String[] args) { + String str = "12345"; + int sum = 0; + //정답 + for (int i = 0; i < str.length(); i++) { +// sum += Integer.parseInt(str.charAt(i) + ""); + sum += str.charAt(i) - '0'; + } + System.out.println("sum = " + sum); + } +} diff --git a/src/yuyeongwoo/report3/Report3_8.java b/src/yuyeongwoo/report3/Report3_8.java new file mode 100644 index 0000000..4847382 --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_8.java @@ -0,0 +1,8 @@ +package yuyeongwoo.report3; +// 4-8번 문제 +public class Report3_8 { + public static void main(String[] args) { + int value = (int) (Math.random() * 6) + 1; + System.out.println("value = " + value); + } +} diff --git a/src/yuyeongwoo/report3/Report3_9.java b/src/yuyeongwoo/report3/Report3_9.java new file mode 100644 index 0000000..43d71c4 --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_9.java @@ -0,0 +1,13 @@ +package yuyeongwoo.report3; +// 4-9번 문제 +public class Report3_9 { + public static void main(String[] args) { + int num = 12345; + int sum = 0; + while (num != 0) { + sum += num % 10; + num /= 10; + } + System.out.println("sum = " + sum); + } +} diff --git a/src/yuyeongwoo/report4/Report4_1 b/src/yuyeongwoo/report4/Report4_1 new file mode 100644 index 0000000..a826cf7 --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_1 @@ -0,0 +1,4 @@ +5-1번 문제 + +정답 : 4번 - 이유: 배열의 개수에 따라 자동으로 크기가 지정되기 때문에 대괄호안에 숫자를 넣을 수 없다. + 5번 - 이유: 배열을 선언하는 단계에서는 크기를 지정할 수 없다. \ No newline at end of file diff --git a/src/yuyeongwoo/report4/Report4_2 b/src/yuyeongwoo/report4/Report4_2 new file mode 100644 index 0000000..8586312 --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_2 @@ -0,0 +1,3 @@ +5-2번 문제 + +정답 : 4번째 배열의 길이 - 2 \ No newline at end of file diff --git a/src/yuyeongwoo/report4/Report4_3.java b/src/yuyeongwoo/report4/Report4_3.java new file mode 100644 index 0000000..e92df55 --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_3.java @@ -0,0 +1,12 @@ +package yuyeongwoo.report4; +// 5-3번 문제 +public class Report4_3 { + public static void main(String[] args) { + int[] arr = {10, 20, 30, 40, 50}; + int sum = 0; + for (int i : arr) { + sum += i; + } + System.out.println("sum = " + sum); + } +} diff --git a/src/yuyeongwoo/report4/Report4_4.java b/src/yuyeongwoo/report4/Report4_4.java new file mode 100644 index 0000000..97c8096 --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_4.java @@ -0,0 +1,23 @@ +package yuyeongwoo.report4; +// 5-4번 문제 +public class Report4_4 { + public static void main(String[] args) { + int[][] arr = { + { 5, 5, 5, 5, 5 }, + { 10, 10, 10, 10, 10 }, + { 20, 20, 20, 20, 20 }, + { 30, 30, 30, 30, 30 } + }; + int total = 0; + float average = 0; + + for (int i = 0; i < arr.length; i++) { + for (int j = 0; j < arr[0].length; j++) { + total += arr[i][j]; + } + } + average = (float) total / (arr.length * arr[0].length); + System.out.println("total = " + total); + System.out.println("average = " + average); + } +} diff --git a/src/yuyeongwoo/report4/Report4_5.java b/src/yuyeongwoo/report4/Report4_5.java new file mode 100644 index 0000000..ac52e7d --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_5.java @@ -0,0 +1,30 @@ +package yuyeongwoo.report4; + +import java.util.Arrays; + +// 5-5번 문제 +public class Report4_5 { + public static void main(String[] args) { + int[] ballArr = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + int[] ball3 = new int[3]; + + for (int i = 0; i < ballArr.length; i++) { + int j = (int) (Math.random() * ballArr.length); + int tmp = 0; + + tmp = ballArr[i]; + ballArr[i] = ballArr[j]; + ballArr[j] = tmp; + } + +// for (int i = 0; i < 3; i++) { +// ball3[i] = ballArr[i]; +// } + + ball3 = Arrays.copyOf(ballArr, 3); + + for (int i = 0; i < ball3.length; i++) { + System.out.print(ball3[i]); + } + } +} diff --git a/src/yuyeongwoo/report4/Report4_6.java b/src/yuyeongwoo/report4/Report4_6.java new file mode 100644 index 0000000..bef0615 --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_6.java @@ -0,0 +1,34 @@ +package yuyeongwoo.report4; + +import java.util.Scanner; + +// 5-6번 문제 +public class Report4_6 { + public static void main(String[] args) { + String[] words = { "television", "computer", "mouse", "phone" }; + + Scanner scanner = new Scanner(System.in); + + for (int i = 0; i < words.length; i++) { + char[] question = words[i].toCharArray(); + + for (int j = 0; j < question.length; j++) { + int k = (int) (Math.random() * question.length); + char tmp = 0; + + tmp = question[i]; + question[i] = question[k]; + question[k] = tmp; + } + + + System.out.printf("Q%d. %s의 정답을 입력하세요.> ", i + 1, new String(question)); + String answer = scanner.nextLine(); + + if (words[i].equals(answer.trim())) + System.out.printf("맞았습니다.%n%n"); + else + System.out.printf("틀렸습니다.%n%n"); + } + } +} From 35015979863625897243ac89e545168b43aadaff Mon Sep 17 00:00:00 2001 From: HEUKWU Date: Thu, 19 Jan 2023 13:58:07 +0900 Subject: [PATCH 3/7] =?UTF-8?q?=EC=9C=A0=EC=98=81=EC=9A=B0(yuyeongwoo)=20R?= =?UTF-8?q?eport3,=20Report4=20=EA=B3=BC=EC=A0=9C=20=EC=A0=9C=EC=B6=9C=20?= =?UTF-8?q?=EC=B7=A8=EC=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/yuyeongwoo/report3/Report3_1 | 26 -------------------- src/yuyeongwoo/report3/Report3_10.java | 28 --------------------- src/yuyeongwoo/report3/Report3_2.java | 14 ----------- src/yuyeongwoo/report3/Report3_3.java | 14 ----------- src/yuyeongwoo/report3/Report3_4.java | 19 -------------- src/yuyeongwoo/report3/Report3_5.java | 16 ------------ src/yuyeongwoo/report3/Report3_6.java | 13 ---------- src/yuyeongwoo/report3/Report3_7.java | 14 ----------- src/yuyeongwoo/report3/Report3_8.java | 8 ------ src/yuyeongwoo/report3/Report3_9.java | 13 ---------- src/yuyeongwoo/report4/Report4_1 | 4 --- src/yuyeongwoo/report4/Report4_2 | 3 --- src/yuyeongwoo/report4/Report4_3.java | 12 --------- src/yuyeongwoo/report4/Report4_4.java | 23 ----------------- src/yuyeongwoo/report4/Report4_5.java | 30 ----------------------- src/yuyeongwoo/report4/Report4_6.java | 34 -------------------------- 16 files changed, 271 deletions(-) delete mode 100644 src/yuyeongwoo/report3/Report3_1 delete mode 100644 src/yuyeongwoo/report3/Report3_10.java delete mode 100644 src/yuyeongwoo/report3/Report3_2.java delete mode 100644 src/yuyeongwoo/report3/Report3_3.java delete mode 100644 src/yuyeongwoo/report3/Report3_4.java delete mode 100644 src/yuyeongwoo/report3/Report3_5.java delete mode 100644 src/yuyeongwoo/report3/Report3_6.java delete mode 100644 src/yuyeongwoo/report3/Report3_7.java delete mode 100644 src/yuyeongwoo/report3/Report3_8.java delete mode 100644 src/yuyeongwoo/report3/Report3_9.java delete mode 100644 src/yuyeongwoo/report4/Report4_1 delete mode 100644 src/yuyeongwoo/report4/Report4_2 delete mode 100644 src/yuyeongwoo/report4/Report4_3.java delete mode 100644 src/yuyeongwoo/report4/Report4_4.java delete mode 100644 src/yuyeongwoo/report4/Report4_5.java delete mode 100644 src/yuyeongwoo/report4/Report4_6.java diff --git a/src/yuyeongwoo/report3/Report3_1 b/src/yuyeongwoo/report3/Report3_1 deleted file mode 100644 index a35a2c3..0000000 --- a/src/yuyeongwoo/report3/Report3_1 +++ /dev/null @@ -1,26 +0,0 @@ -4-1번 문제 - -정답 : -//int형 변수 x가 10보다 크고 20보다 작을 때 true인 조건식 -- 10 < x && x < 20 - -//char형 변수 ch가 공백이나 탭이 아닐 때 true인 조건식 -- !(ch == ' ' || ch == \t) - -//char형 변수 ch가 'x' 또는 'X'일 때 true인 조건식 -- ch == 'x' || ch == 'X' - -//char형 변수 ch가 숫자('0'~'9')일 때 true인 조건식 -- '0' <= ch && ch <= '9' - -//char형 변수 ch가 영문자(대문자 또는 소문자)일 때 true인 조건식 -- ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') - -//int형 변수 year가 400으로 나눠떨어지거나 또는 4로 나눠떨어지고 100으로 나눠떨어지지 않을때 true인 조건식 -- year % 400 == 0 || year % 4 == 0 && year % 100 != 0 - -//boolean형 변수 powerOn이 false일 때 true인 조건식 -- !powerOn - -//문자열 참조변수 str이 "yes"일 때 true인 조건식 -- str.equals("yes") diff --git a/src/yuyeongwoo/report3/Report3_10.java b/src/yuyeongwoo/report3/Report3_10.java deleted file mode 100644 index 3a0b3f3..0000000 --- a/src/yuyeongwoo/report3/Report3_10.java +++ /dev/null @@ -1,28 +0,0 @@ -package yuyeongwoo.report3; - -import java.util.Scanner; - -// 4-10번 문제 -public class Report3_10 { - public static void main(String[] args) { - int answer = (int) (Math.random() * 100) + 1; - int input = 0; - int count = 0; - - Scanner s = new Scanner(System.in); - do { - count++; - System.out.print("1과 100사이의 값을 입력하세요. : "); - input = s.nextInt(); - if (answer > input) { - System.out.println("더 큰 수를 입력하세요."); - } else if (answer < input) { - System.out.println("더 작은 수를 입력하세요."); - } else { - System.out.println("맞혔습니다."); - System.out.println("시도횟수는 " + count + "번 입니다."); - break; - } - } while (true); - } -} diff --git a/src/yuyeongwoo/report3/Report3_2.java b/src/yuyeongwoo/report3/Report3_2.java deleted file mode 100644 index 770a11b..0000000 --- a/src/yuyeongwoo/report3/Report3_2.java +++ /dev/null @@ -1,14 +0,0 @@ -package yuyeongwoo.report3; -// 4-2번 문제 -public class Report3_2 { - public static void main(String[] args) { - int sum = 0; - //정답 - for (int i = 1; i < 20; i++) { - if (!(i % 2 == 0 || i % 3 == 0)) { - sum += i; - } - } - System.out.println("sum = " + sum); - } -} diff --git a/src/yuyeongwoo/report3/Report3_3.java b/src/yuyeongwoo/report3/Report3_3.java deleted file mode 100644 index 54c77df..0000000 --- a/src/yuyeongwoo/report3/Report3_3.java +++ /dev/null @@ -1,14 +0,0 @@ -package yuyeongwoo.report3; -// 4-3번 문제 -public class Report3_3 { - public static void main(String[] args) { - int sum = 0; - int totalSum = 0; - //정답 - for (int i = 1; i <= 10; i++) { - sum += i; - totalSum += sum; - } - System.out.println("totalSum = " + totalSum); - } -} diff --git a/src/yuyeongwoo/report3/Report3_4.java b/src/yuyeongwoo/report3/Report3_4.java deleted file mode 100644 index 148acff..0000000 --- a/src/yuyeongwoo/report3/Report3_4.java +++ /dev/null @@ -1,19 +0,0 @@ -package yuyeongwoo.report3; -// 4-4번 문제 -public class Report3_4 { - public static void main(String[] args) { - int sum = 0; - int s = 1; - int num = 0; - for (int i = 1; true; i++) { - sum += i * s; - if (sum >= 100) { - num = i * s; - break; - } - s = -s; - } - System.out.println("num = " + num); - System.out.println("sum = " + sum); - } -} diff --git a/src/yuyeongwoo/report3/Report3_5.java b/src/yuyeongwoo/report3/Report3_5.java deleted file mode 100644 index 7f2293a..0000000 --- a/src/yuyeongwoo/report3/Report3_5.java +++ /dev/null @@ -1,16 +0,0 @@ -package yuyeongwoo.report3; -// 4-5번 문제 -public class Report3_5 { - public static void main(String[] args) { - int i = 0; - while (i <= 10) { - int j = 0; - while (j <= i) { - System.out.print("*"); - j++; - } - System.out.println(); - i++; - } - } -} diff --git a/src/yuyeongwoo/report3/Report3_6.java b/src/yuyeongwoo/report3/Report3_6.java deleted file mode 100644 index 5f186cb..0000000 --- a/src/yuyeongwoo/report3/Report3_6.java +++ /dev/null @@ -1,13 +0,0 @@ -package yuyeongwoo.report3; -// 4-6번 문제 -public class Report3_6 { - public static void main(String[] args) { - for (int i = 1; i <= 6; i++) { - for (int j = 1; j <= 6; j++) { - if (i + j == 6) { - System.out.println(i + " + " + j + " = " + (i + j)); - } - } - } - } -} diff --git a/src/yuyeongwoo/report3/Report3_7.java b/src/yuyeongwoo/report3/Report3_7.java deleted file mode 100644 index e9669b2..0000000 --- a/src/yuyeongwoo/report3/Report3_7.java +++ /dev/null @@ -1,14 +0,0 @@ -package yuyeongwoo.report3; -// 4-7번 문제 -public class Report3_7 { - public static void main(String[] args) { - String str = "12345"; - int sum = 0; - //정답 - for (int i = 0; i < str.length(); i++) { -// sum += Integer.parseInt(str.charAt(i) + ""); - sum += str.charAt(i) - '0'; - } - System.out.println("sum = " + sum); - } -} diff --git a/src/yuyeongwoo/report3/Report3_8.java b/src/yuyeongwoo/report3/Report3_8.java deleted file mode 100644 index 4847382..0000000 --- a/src/yuyeongwoo/report3/Report3_8.java +++ /dev/null @@ -1,8 +0,0 @@ -package yuyeongwoo.report3; -// 4-8번 문제 -public class Report3_8 { - public static void main(String[] args) { - int value = (int) (Math.random() * 6) + 1; - System.out.println("value = " + value); - } -} diff --git a/src/yuyeongwoo/report3/Report3_9.java b/src/yuyeongwoo/report3/Report3_9.java deleted file mode 100644 index 43d71c4..0000000 --- a/src/yuyeongwoo/report3/Report3_9.java +++ /dev/null @@ -1,13 +0,0 @@ -package yuyeongwoo.report3; -// 4-9번 문제 -public class Report3_9 { - public static void main(String[] args) { - int num = 12345; - int sum = 0; - while (num != 0) { - sum += num % 10; - num /= 10; - } - System.out.println("sum = " + sum); - } -} diff --git a/src/yuyeongwoo/report4/Report4_1 b/src/yuyeongwoo/report4/Report4_1 deleted file mode 100644 index a826cf7..0000000 --- a/src/yuyeongwoo/report4/Report4_1 +++ /dev/null @@ -1,4 +0,0 @@ -5-1번 문제 - -정답 : 4번 - 이유: 배열의 개수에 따라 자동으로 크기가 지정되기 때문에 대괄호안에 숫자를 넣을 수 없다. - 5번 - 이유: 배열을 선언하는 단계에서는 크기를 지정할 수 없다. \ No newline at end of file diff --git a/src/yuyeongwoo/report4/Report4_2 b/src/yuyeongwoo/report4/Report4_2 deleted file mode 100644 index 8586312..0000000 --- a/src/yuyeongwoo/report4/Report4_2 +++ /dev/null @@ -1,3 +0,0 @@ -5-2번 문제 - -정답 : 4번째 배열의 길이 - 2 \ No newline at end of file diff --git a/src/yuyeongwoo/report4/Report4_3.java b/src/yuyeongwoo/report4/Report4_3.java deleted file mode 100644 index e92df55..0000000 --- a/src/yuyeongwoo/report4/Report4_3.java +++ /dev/null @@ -1,12 +0,0 @@ -package yuyeongwoo.report4; -// 5-3번 문제 -public class Report4_3 { - public static void main(String[] args) { - int[] arr = {10, 20, 30, 40, 50}; - int sum = 0; - for (int i : arr) { - sum += i; - } - System.out.println("sum = " + sum); - } -} diff --git a/src/yuyeongwoo/report4/Report4_4.java b/src/yuyeongwoo/report4/Report4_4.java deleted file mode 100644 index 97c8096..0000000 --- a/src/yuyeongwoo/report4/Report4_4.java +++ /dev/null @@ -1,23 +0,0 @@ -package yuyeongwoo.report4; -// 5-4번 문제 -public class Report4_4 { - public static void main(String[] args) { - int[][] arr = { - { 5, 5, 5, 5, 5 }, - { 10, 10, 10, 10, 10 }, - { 20, 20, 20, 20, 20 }, - { 30, 30, 30, 30, 30 } - }; - int total = 0; - float average = 0; - - for (int i = 0; i < arr.length; i++) { - for (int j = 0; j < arr[0].length; j++) { - total += arr[i][j]; - } - } - average = (float) total / (arr.length * arr[0].length); - System.out.println("total = " + total); - System.out.println("average = " + average); - } -} diff --git a/src/yuyeongwoo/report4/Report4_5.java b/src/yuyeongwoo/report4/Report4_5.java deleted file mode 100644 index ac52e7d..0000000 --- a/src/yuyeongwoo/report4/Report4_5.java +++ /dev/null @@ -1,30 +0,0 @@ -package yuyeongwoo.report4; - -import java.util.Arrays; - -// 5-5번 문제 -public class Report4_5 { - public static void main(String[] args) { - int[] ballArr = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - int[] ball3 = new int[3]; - - for (int i = 0; i < ballArr.length; i++) { - int j = (int) (Math.random() * ballArr.length); - int tmp = 0; - - tmp = ballArr[i]; - ballArr[i] = ballArr[j]; - ballArr[j] = tmp; - } - -// for (int i = 0; i < 3; i++) { -// ball3[i] = ballArr[i]; -// } - - ball3 = Arrays.copyOf(ballArr, 3); - - for (int i = 0; i < ball3.length; i++) { - System.out.print(ball3[i]); - } - } -} diff --git a/src/yuyeongwoo/report4/Report4_6.java b/src/yuyeongwoo/report4/Report4_6.java deleted file mode 100644 index bef0615..0000000 --- a/src/yuyeongwoo/report4/Report4_6.java +++ /dev/null @@ -1,34 +0,0 @@ -package yuyeongwoo.report4; - -import java.util.Scanner; - -// 5-6번 문제 -public class Report4_6 { - public static void main(String[] args) { - String[] words = { "television", "computer", "mouse", "phone" }; - - Scanner scanner = new Scanner(System.in); - - for (int i = 0; i < words.length; i++) { - char[] question = words[i].toCharArray(); - - for (int j = 0; j < question.length; j++) { - int k = (int) (Math.random() * question.length); - char tmp = 0; - - tmp = question[i]; - question[i] = question[k]; - question[k] = tmp; - } - - - System.out.printf("Q%d. %s의 정답을 입력하세요.> ", i + 1, new String(question)); - String answer = scanner.nextLine(); - - if (words[i].equals(answer.trim())) - System.out.printf("맞았습니다.%n%n"); - else - System.out.printf("틀렸습니다.%n%n"); - } - } -} From cc066343420e429860fd64976d0d439efc5aac31 Mon Sep 17 00:00:00 2001 From: HEUKWU Date: Thu, 19 Jan 2023 21:09:01 +0900 Subject: [PATCH 4/7] =?UTF-8?q?=EC=9C=A0=EC=98=81=EC=9A=B0(yuyeongwoo)=20R?= =?UTF-8?q?eport3,=20Report4=20=EA=B3=BC=EC=A0=9C=20=EC=A0=9C=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/yuyeongwoo/report3/Report3_1 | 26 +++++++++++++++ src/yuyeongwoo/report3/Report3_10.java | 28 ++++++++++++++++ src/yuyeongwoo/report3/Report3_2.java | 14 ++++++++ src/yuyeongwoo/report3/Report3_3.java | 14 ++++++++ src/yuyeongwoo/report3/Report3_4.java | 19 +++++++++++ src/yuyeongwoo/report3/Report3_5.java | 16 +++++++++ src/yuyeongwoo/report3/Report3_6.java | 13 ++++++++ src/yuyeongwoo/report3/Report3_7.java | 14 ++++++++ src/yuyeongwoo/report3/Report3_8.java | 8 +++++ src/yuyeongwoo/report3/Report3_9.java | 13 ++++++++ src/yuyeongwoo/report3/Untitled Diagram.jpg | Bin 0 -> 38479 bytes src/yuyeongwoo/report4/Report4_1 | 4 +++ src/yuyeongwoo/report4/Report4_2 | 3 ++ src/yuyeongwoo/report4/Report4_3.java | 12 +++++++ src/yuyeongwoo/report4/Report4_4.java | 23 +++++++++++++ src/yuyeongwoo/report4/Report4_5.java | 30 +++++++++++++++++ src/yuyeongwoo/report4/Report4_6.java | 34 ++++++++++++++++++++ 17 files changed, 271 insertions(+) create mode 100644 src/yuyeongwoo/report3/Report3_1 create mode 100644 src/yuyeongwoo/report3/Report3_10.java create mode 100644 src/yuyeongwoo/report3/Report3_2.java create mode 100644 src/yuyeongwoo/report3/Report3_3.java create mode 100644 src/yuyeongwoo/report3/Report3_4.java create mode 100644 src/yuyeongwoo/report3/Report3_5.java create mode 100644 src/yuyeongwoo/report3/Report3_6.java create mode 100644 src/yuyeongwoo/report3/Report3_7.java create mode 100644 src/yuyeongwoo/report3/Report3_8.java create mode 100644 src/yuyeongwoo/report3/Report3_9.java create mode 100644 src/yuyeongwoo/report3/Untitled Diagram.jpg create mode 100644 src/yuyeongwoo/report4/Report4_1 create mode 100644 src/yuyeongwoo/report4/Report4_2 create mode 100644 src/yuyeongwoo/report4/Report4_3.java create mode 100644 src/yuyeongwoo/report4/Report4_4.java create mode 100644 src/yuyeongwoo/report4/Report4_5.java create mode 100644 src/yuyeongwoo/report4/Report4_6.java diff --git a/src/yuyeongwoo/report3/Report3_1 b/src/yuyeongwoo/report3/Report3_1 new file mode 100644 index 0000000..a35a2c3 --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_1 @@ -0,0 +1,26 @@ +4-1번 문제 + +정답 : +//int형 변수 x가 10보다 크고 20보다 작을 때 true인 조건식 +- 10 < x && x < 20 + +//char형 변수 ch가 공백이나 탭이 아닐 때 true인 조건식 +- !(ch == ' ' || ch == \t) + +//char형 변수 ch가 'x' 또는 'X'일 때 true인 조건식 +- ch == 'x' || ch == 'X' + +//char형 변수 ch가 숫자('0'~'9')일 때 true인 조건식 +- '0' <= ch && ch <= '9' + +//char형 변수 ch가 영문자(대문자 또는 소문자)일 때 true인 조건식 +- ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') + +//int형 변수 year가 400으로 나눠떨어지거나 또는 4로 나눠떨어지고 100으로 나눠떨어지지 않을때 true인 조건식 +- year % 400 == 0 || year % 4 == 0 && year % 100 != 0 + +//boolean형 변수 powerOn이 false일 때 true인 조건식 +- !powerOn + +//문자열 참조변수 str이 "yes"일 때 true인 조건식 +- str.equals("yes") diff --git a/src/yuyeongwoo/report3/Report3_10.java b/src/yuyeongwoo/report3/Report3_10.java new file mode 100644 index 0000000..3a0b3f3 --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_10.java @@ -0,0 +1,28 @@ +package yuyeongwoo.report3; + +import java.util.Scanner; + +// 4-10번 문제 +public class Report3_10 { + public static void main(String[] args) { + int answer = (int) (Math.random() * 100) + 1; + int input = 0; + int count = 0; + + Scanner s = new Scanner(System.in); + do { + count++; + System.out.print("1과 100사이의 값을 입력하세요. : "); + input = s.nextInt(); + if (answer > input) { + System.out.println("더 큰 수를 입력하세요."); + } else if (answer < input) { + System.out.println("더 작은 수를 입력하세요."); + } else { + System.out.println("맞혔습니다."); + System.out.println("시도횟수는 " + count + "번 입니다."); + break; + } + } while (true); + } +} diff --git a/src/yuyeongwoo/report3/Report3_2.java b/src/yuyeongwoo/report3/Report3_2.java new file mode 100644 index 0000000..770a11b --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_2.java @@ -0,0 +1,14 @@ +package yuyeongwoo.report3; +// 4-2번 문제 +public class Report3_2 { + public static void main(String[] args) { + int sum = 0; + //정답 + for (int i = 1; i < 20; i++) { + if (!(i % 2 == 0 || i % 3 == 0)) { + sum += i; + } + } + System.out.println("sum = " + sum); + } +} diff --git a/src/yuyeongwoo/report3/Report3_3.java b/src/yuyeongwoo/report3/Report3_3.java new file mode 100644 index 0000000..54c77df --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_3.java @@ -0,0 +1,14 @@ +package yuyeongwoo.report3; +// 4-3번 문제 +public class Report3_3 { + public static void main(String[] args) { + int sum = 0; + int totalSum = 0; + //정답 + for (int i = 1; i <= 10; i++) { + sum += i; + totalSum += sum; + } + System.out.println("totalSum = " + totalSum); + } +} diff --git a/src/yuyeongwoo/report3/Report3_4.java b/src/yuyeongwoo/report3/Report3_4.java new file mode 100644 index 0000000..148acff --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_4.java @@ -0,0 +1,19 @@ +package yuyeongwoo.report3; +// 4-4번 문제 +public class Report3_4 { + public static void main(String[] args) { + int sum = 0; + int s = 1; + int num = 0; + for (int i = 1; true; i++) { + sum += i * s; + if (sum >= 100) { + num = i * s; + break; + } + s = -s; + } + System.out.println("num = " + num); + System.out.println("sum = " + sum); + } +} diff --git a/src/yuyeongwoo/report3/Report3_5.java b/src/yuyeongwoo/report3/Report3_5.java new file mode 100644 index 0000000..7f2293a --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_5.java @@ -0,0 +1,16 @@ +package yuyeongwoo.report3; +// 4-5번 문제 +public class Report3_5 { + public static void main(String[] args) { + int i = 0; + while (i <= 10) { + int j = 0; + while (j <= i) { + System.out.print("*"); + j++; + } + System.out.println(); + i++; + } + } +} diff --git a/src/yuyeongwoo/report3/Report3_6.java b/src/yuyeongwoo/report3/Report3_6.java new file mode 100644 index 0000000..5f186cb --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_6.java @@ -0,0 +1,13 @@ +package yuyeongwoo.report3; +// 4-6번 문제 +public class Report3_6 { + public static void main(String[] args) { + for (int i = 1; i <= 6; i++) { + for (int j = 1; j <= 6; j++) { + if (i + j == 6) { + System.out.println(i + " + " + j + " = " + (i + j)); + } + } + } + } +} diff --git a/src/yuyeongwoo/report3/Report3_7.java b/src/yuyeongwoo/report3/Report3_7.java new file mode 100644 index 0000000..e9669b2 --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_7.java @@ -0,0 +1,14 @@ +package yuyeongwoo.report3; +// 4-7번 문제 +public class Report3_7 { + public static void main(String[] args) { + String str = "12345"; + int sum = 0; + //정답 + for (int i = 0; i < str.length(); i++) { +// sum += Integer.parseInt(str.charAt(i) + ""); + sum += str.charAt(i) - '0'; + } + System.out.println("sum = " + sum); + } +} diff --git a/src/yuyeongwoo/report3/Report3_8.java b/src/yuyeongwoo/report3/Report3_8.java new file mode 100644 index 0000000..4847382 --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_8.java @@ -0,0 +1,8 @@ +package yuyeongwoo.report3; +// 4-8번 문제 +public class Report3_8 { + public static void main(String[] args) { + int value = (int) (Math.random() * 6) + 1; + System.out.println("value = " + value); + } +} diff --git a/src/yuyeongwoo/report3/Report3_9.java b/src/yuyeongwoo/report3/Report3_9.java new file mode 100644 index 0000000..43d71c4 --- /dev/null +++ b/src/yuyeongwoo/report3/Report3_9.java @@ -0,0 +1,13 @@ +package yuyeongwoo.report3; +// 4-9번 문제 +public class Report3_9 { + public static void main(String[] args) { + int num = 12345; + int sum = 0; + while (num != 0) { + sum += num % 10; + num /= 10; + } + System.out.println("sum = " + sum); + } +} diff --git a/src/yuyeongwoo/report3/Untitled Diagram.jpg b/src/yuyeongwoo/report3/Untitled Diagram.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e632e4828d8c28ae881dfe53399d63e86ffc16e9 GIT binary patch literal 38479 zcmd432RK~a+CRJ*(R=Trg{X;WQ6nOVh?0nIBBBLBw81b!^dJa==r!6zZ=<(}AbKw| zN<^IzVKDgSIp;agIq&;C*Y}%M=#-`W?`7s~+cy}R0X z0RjR5(8B)!7f9f~2E@@00CaT$5dZ*40fKNxfC&E%e+s~kuK)nbCICSASAyS;WfT7K z>1a0SAMZgEznyr|4$zU}-;RO^_y9sW0uUX+MK{2M|K=rvzm?xk`mGQUf`~2=laP{; zQ{Ydir3DBHKp;XQ(4|X6_TLbgUQI5SyE-PM@%0ON9U2xM5gC<`_%10q<$Y>eZeD&tVNvnNlB(*O+PeCN#-`4$?w;Ph&;4IU z$Hpfnr>19Sk*Jl`we{~CKQ=M@KM#H#9$}A9ezObTDt|W%|MxHLqQl!oNJIo8BKgfO z0z#kP45uTy#Cx5XUd@2S+MR(<>J=&D?f9I^4l@25hG?dzFGt9k1*DOJnBPqMn`Qr= zVZr|+%lHy*23W$&pbO{6kT_V1OFT|w8zZFt)(!Uk*-wWm63iWS==8tlL z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8r8ehWPQ^K|jc zexWFVh#a zU+|Hu99IZ)cCQ3#SICLP-K1})j;@1&U@GB>pF!ningS!#EsT?P3)GuR+Ugu>`UFYo zf{De74D-xebU4oGDP5kKT>GP5e|d)kb@;=hBYG%409i!V8i7sqL_?Vc--cdWd8~?{ zWy?)?8a!AP?Y~9_^d`Zs{)@orWq|bc^uy?!6MDR!x)s{5m_TM`oIs%i^n~?q@k$f_ E4-R+d-2eap literal 0 HcmV?d00001 diff --git a/src/yuyeongwoo/report4/Report4_1 b/src/yuyeongwoo/report4/Report4_1 new file mode 100644 index 0000000..a826cf7 --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_1 @@ -0,0 +1,4 @@ +5-1번 문제 + +정답 : 4번 - 이유: 배열의 개수에 따라 자동으로 크기가 지정되기 때문에 대괄호안에 숫자를 넣을 수 없다. + 5번 - 이유: 배열을 선언하는 단계에서는 크기를 지정할 수 없다. \ No newline at end of file diff --git a/src/yuyeongwoo/report4/Report4_2 b/src/yuyeongwoo/report4/Report4_2 new file mode 100644 index 0000000..8586312 --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_2 @@ -0,0 +1,3 @@ +5-2번 문제 + +정답 : 4번째 배열의 길이 - 2 \ No newline at end of file diff --git a/src/yuyeongwoo/report4/Report4_3.java b/src/yuyeongwoo/report4/Report4_3.java new file mode 100644 index 0000000..e92df55 --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_3.java @@ -0,0 +1,12 @@ +package yuyeongwoo.report4; +// 5-3번 문제 +public class Report4_3 { + public static void main(String[] args) { + int[] arr = {10, 20, 30, 40, 50}; + int sum = 0; + for (int i : arr) { + sum += i; + } + System.out.println("sum = " + sum); + } +} diff --git a/src/yuyeongwoo/report4/Report4_4.java b/src/yuyeongwoo/report4/Report4_4.java new file mode 100644 index 0000000..97c8096 --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_4.java @@ -0,0 +1,23 @@ +package yuyeongwoo.report4; +// 5-4번 문제 +public class Report4_4 { + public static void main(String[] args) { + int[][] arr = { + { 5, 5, 5, 5, 5 }, + { 10, 10, 10, 10, 10 }, + { 20, 20, 20, 20, 20 }, + { 30, 30, 30, 30, 30 } + }; + int total = 0; + float average = 0; + + for (int i = 0; i < arr.length; i++) { + for (int j = 0; j < arr[0].length; j++) { + total += arr[i][j]; + } + } + average = (float) total / (arr.length * arr[0].length); + System.out.println("total = " + total); + System.out.println("average = " + average); + } +} diff --git a/src/yuyeongwoo/report4/Report4_5.java b/src/yuyeongwoo/report4/Report4_5.java new file mode 100644 index 0000000..ac52e7d --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_5.java @@ -0,0 +1,30 @@ +package yuyeongwoo.report4; + +import java.util.Arrays; + +// 5-5번 문제 +public class Report4_5 { + public static void main(String[] args) { + int[] ballArr = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + int[] ball3 = new int[3]; + + for (int i = 0; i < ballArr.length; i++) { + int j = (int) (Math.random() * ballArr.length); + int tmp = 0; + + tmp = ballArr[i]; + ballArr[i] = ballArr[j]; + ballArr[j] = tmp; + } + +// for (int i = 0; i < 3; i++) { +// ball3[i] = ballArr[i]; +// } + + ball3 = Arrays.copyOf(ballArr, 3); + + for (int i = 0; i < ball3.length; i++) { + System.out.print(ball3[i]); + } + } +} diff --git a/src/yuyeongwoo/report4/Report4_6.java b/src/yuyeongwoo/report4/Report4_6.java new file mode 100644 index 0000000..bef0615 --- /dev/null +++ b/src/yuyeongwoo/report4/Report4_6.java @@ -0,0 +1,34 @@ +package yuyeongwoo.report4; + +import java.util.Scanner; + +// 5-6번 문제 +public class Report4_6 { + public static void main(String[] args) { + String[] words = { "television", "computer", "mouse", "phone" }; + + Scanner scanner = new Scanner(System.in); + + for (int i = 0; i < words.length; i++) { + char[] question = words[i].toCharArray(); + + for (int j = 0; j < question.length; j++) { + int k = (int) (Math.random() * question.length); + char tmp = 0; + + tmp = question[i]; + question[i] = question[k]; + question[k] = tmp; + } + + + System.out.printf("Q%d. %s의 정답을 입력하세요.> ", i + 1, new String(question)); + String answer = scanner.nextLine(); + + if (words[i].equals(answer.trim())) + System.out.printf("맞았습니다.%n%n"); + else + System.out.printf("틀렸습니다.%n%n"); + } + } +} From 62a0d9ef7213d8dbe97d952de419b8f74af094c9 Mon Sep 17 00:00:00 2001 From: HEUKWU Date: Fri, 20 Jan 2023 14:03:22 +0900 Subject: [PATCH 5/7] =?UTF-8?q?=EC=9C=A0=EC=98=81=EC=9A=B0(yuyeongwoo)=20R?= =?UTF-8?q?eport5,=20Report6=20=EA=B3=BC=EC=A0=9C=20=EC=A0=9C=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/yuyeongwoo/report5/Report5_1 | 10 +++++ src/yuyeongwoo/report5/Report5_2.java | 34 +++++++++++++++ src/yuyeongwoo/report5/Report5_3.java | 43 +++++++++++++++++++ src/yuyeongwoo/report5/Report5_4 | 19 +++++++++ src/yuyeongwoo/report5/Report5_5 | 22 ++++++++++ src/yuyeongwoo/report6/report6_1 | 4 ++ src/yuyeongwoo/report6/report6_2 | 3 ++ src/yuyeongwoo/report6/report6_3 | 4 ++ src/yuyeongwoo/report6/report6_4 | 3 ++ src/yuyeongwoo/report6/report6_5 | 4 ++ src/yuyeongwoo/report6/report6_6 | 3 ++ src/yuyeongwoo/report6/report6_7 | 4 ++ src/yuyeongwoo/report6/report6_8 | 3 ++ src/yuyeongwoo/report6/report6_9 | 18 ++++++++ src/yuyeongwoo/report7/report7_1.java | 22 ++++++++++ src/yuyeongwoo/report7/report7_2.java | 23 ++++++++++ src/yuyeongwoo/report7/report7_3.java | 60 +++++++++++++++++++++++++++ src/yuyeongwoo/report7/report7_4.java | 26 ++++++++++++ src/yuyeongwoo/report7/report7_5.java | 14 +++++++ 19 files changed, 319 insertions(+) create mode 100644 src/yuyeongwoo/report5/Report5_1 create mode 100644 src/yuyeongwoo/report5/Report5_2.java create mode 100644 src/yuyeongwoo/report5/Report5_3.java create mode 100644 src/yuyeongwoo/report5/Report5_4 create mode 100644 src/yuyeongwoo/report5/Report5_5 create mode 100644 src/yuyeongwoo/report6/report6_1 create mode 100644 src/yuyeongwoo/report6/report6_2 create mode 100644 src/yuyeongwoo/report6/report6_3 create mode 100644 src/yuyeongwoo/report6/report6_4 create mode 100644 src/yuyeongwoo/report6/report6_5 create mode 100644 src/yuyeongwoo/report6/report6_6 create mode 100644 src/yuyeongwoo/report6/report6_7 create mode 100644 src/yuyeongwoo/report6/report6_8 create mode 100644 src/yuyeongwoo/report6/report6_9 create mode 100644 src/yuyeongwoo/report7/report7_1.java create mode 100644 src/yuyeongwoo/report7/report7_2.java create mode 100644 src/yuyeongwoo/report7/report7_3.java create mode 100644 src/yuyeongwoo/report7/report7_4.java create mode 100644 src/yuyeongwoo/report7/report7_5.java diff --git a/src/yuyeongwoo/report5/Report5_1 b/src/yuyeongwoo/report5/Report5_1 new file mode 100644 index 0000000..e1e164e --- /dev/null +++ b/src/yuyeongwoo/report5/Report5_1 @@ -0,0 +1,10 @@ +6-1번 문제 + +정답 : class Student { + String name; + int ban; + int no; + int kor; + int eng; + int math; + } \ No newline at end of file diff --git a/src/yuyeongwoo/report5/Report5_2.java b/src/yuyeongwoo/report5/Report5_2.java new file mode 100644 index 0000000..031b797 --- /dev/null +++ b/src/yuyeongwoo/report5/Report5_2.java @@ -0,0 +1,34 @@ +package yuyeongwoo.report5; +//6-2번 문제 +public class Report5_2 { + public static void main(String[] args){ + Student s = new Student("홍길동", 1, 1, 100, 60, 76); + + String str = s.info(); + System.out.println(str); + }// 예상 결과 : 홍길동, 1, 1, 100, 60, 76, 236, 78.7 +} + +class Student { + String name; + int ban; + int no; + int kor; + int eng; + int math; + + public Student(String name, int ban, int no, int kor, int eng, int math) { + this.name = name; + this.ban = ban; + this.no = no; + this.kor = kor; + this.eng = eng; + this.math = math; + } + + + + public String info() { + return name + ", " + ban + ", " + no + ", " + kor + ", " + eng + ", " + math + ", " + (kor + eng + math) + ", " + ((int)((kor + eng + math) / 3f * 10 + 0.5) / 10f ); + } +} \ No newline at end of file diff --git a/src/yuyeongwoo/report5/Report5_3.java b/src/yuyeongwoo/report5/Report5_3.java new file mode 100644 index 0000000..fe94658 --- /dev/null +++ b/src/yuyeongwoo/report5/Report5_3.java @@ -0,0 +1,43 @@ +package yuyeongwoo.report5; +//6-3번 문제 +public class Report5_3 { + public static void main(String[] args){ + Student2 s = new Student2("홍길동", 1, 1, 100, 60, 76); + + s.name = "홍길동"; + s.ban = 1; + s.no = 1; + s.kor = 100; + s.eng = 60; + s.math = 76; + System.out.println("이름 :"+s.name); + System.out.println("총점 :"+s.getTotal()); + System.out.println("평균 :"+s.getAverage()); + }// 예상 결과 : 홍길동, 1, 1, 100, 60, 76, 236, 78.7 +} + +class Student2 { + String name; + int ban; + int no; + int kor; + int eng; + int math; + + public Student2(String name, int ban, int no, int kor, int eng, int math) { + this.name = name; + this.ban = ban; + this.no = no; + this.kor = kor; + this.eng = eng; + this.math = math; + } + + int getTotal() { + return kor + eng + math; + } + + float getAverage() { + return (int) (getTotal() / 3f * 10 + 0.5) / 10f; + } +} \ No newline at end of file diff --git a/src/yuyeongwoo/report5/Report5_4 b/src/yuyeongwoo/report5/Report5_4 new file mode 100644 index 0000000..114ab93 --- /dev/null +++ b/src/yuyeongwoo/report5/Report5_4 @@ -0,0 +1,19 @@ +6-5번 문제 + +정답 : class PlayingCard { + int kind; + int num; + static int width; + static int height; + PlayingCard(int k, int n) { + kind = k; + num = n; + } + public static void main(String args[]) { + PlayingCard card = new PlayingCard(1,1); + } + } + +클래스 변수 : width, height +인스턴스 변수 : kind, num +지역변수 : k, n, card, args \ No newline at end of file diff --git a/src/yuyeongwoo/report5/Report5_5 b/src/yuyeongwoo/report5/Report5_5 new file mode 100644 index 0000000..a2bc4ff --- /dev/null +++ b/src/yuyeongwoo/report5/Report5_5 @@ -0,0 +1,22 @@ +6-7번 문제 + +정답 : class Marine { + int x=0, y=0; //Marine의 위치좌표 (x,y) + int hp = 60; //현재 체력 + static int weapon = 6; //공격력 + static int armor = 0; //방어력 + static void weaponUp() { + weapon++; + } + static void armorUp() { + armor++; + } + void move(int x, int y) { + this.x = x; + this.y = y; + } + } + +weapon, armor : weapon과 armor변수는 모든 인스턴스에 대해 +동일한 값을 가져야 하기 때문에 static 변수여야 한다. +void weaponUp(), void armorUp() : weapon과 armor변수가 static이기 때문에 static메서드여야 한다. \ No newline at end of file diff --git a/src/yuyeongwoo/report6/report6_1 b/src/yuyeongwoo/report6/report6_1 new file mode 100644 index 0000000..d53a8e8 --- /dev/null +++ b/src/yuyeongwoo/report6/report6_1 @@ -0,0 +1,4 @@ +문제 6-8번 + +b : 생성자는 초기화의 목적이 있고 객체를 생성하는 것은 new연산자이다. +e : 생성자는 오버로딩이 가능하다. \ No newline at end of file diff --git a/src/yuyeongwoo/report6/report6_2 b/src/yuyeongwoo/report6/report6_2 new file mode 100644 index 0000000..6670452 --- /dev/null +++ b/src/yuyeongwoo/report6/report6_2 @@ -0,0 +1,3 @@ +문제 6-9번 + +b : 클래스 멤버 안에서는 사용이 불가하다. \ No newline at end of file diff --git a/src/yuyeongwoo/report6/report6_3 b/src/yuyeongwoo/report6/report6_3 new file mode 100644 index 0000000..5aa7c19 --- /dev/null +++ b/src/yuyeongwoo/report6/report6_3 @@ -0,0 +1,4 @@ +문제 6-10번 + +c : 리턴타입은 영향을 주지 않는다. +d : 매개변수의 이름은 상관이 없다. \ No newline at end of file diff --git a/src/yuyeongwoo/report6/report6_4 b/src/yuyeongwoo/report6/report6_4 new file mode 100644 index 0000000..4b97944 --- /dev/null +++ b/src/yuyeongwoo/report6/report6_4 @@ -0,0 +1,3 @@ +문제 6-11번 + +b, c, d \ No newline at end of file diff --git a/src/yuyeongwoo/report6/report6_5 b/src/yuyeongwoo/report6/report6_5 new file mode 100644 index 0000000..d20b982 --- /dev/null +++ b/src/yuyeongwoo/report6/report6_5 @@ -0,0 +1,4 @@ +문제 6-12번 + +c : 초기화 블럭이 먼저 초기화 된다. +e : 클래스 변수가 먼저 초기화 된다. \ No newline at end of file diff --git a/src/yuyeongwoo/report6/report6_6 b/src/yuyeongwoo/report6/report6_6 new file mode 100644 index 0000000..d6618ff --- /dev/null +++ b/src/yuyeongwoo/report6/report6_6 @@ -0,0 +1,3 @@ +문제 6-13번 + +a : 기본값 - 명시적 초기화 - 초기화 블럭 - 생성자 \ No newline at end of file diff --git a/src/yuyeongwoo/report6/report6_7 b/src/yuyeongwoo/report6/report6_7 new file mode 100644 index 0000000..2a65bba --- /dev/null +++ b/src/yuyeongwoo/report6/report6_7 @@ -0,0 +1,4 @@ +문제 6-14번 + +a : 사용전에 수동으로 초기화 해줘야 한다. +e : 지역변수는 호출스택에 생성된다. diff --git a/src/yuyeongwoo/report6/report6_8 b/src/yuyeongwoo/report6/report6_8 new file mode 100644 index 0000000..35ddc4f --- /dev/null +++ b/src/yuyeongwoo/report6/report6_8 @@ -0,0 +1,3 @@ +문제 6-15번 + +b : 종료된게 아니라 대기중이다. diff --git a/src/yuyeongwoo/report6/report6_9 b/src/yuyeongwoo/report6/report6_9 new file mode 100644 index 0000000..05ae4fb --- /dev/null +++ b/src/yuyeongwoo/report6/report6_9 @@ -0,0 +1,18 @@ +문제 6-16번 + +class Exercise6_16 { + public static void change(String str) { + str += "456"; + } + + public static void main(String[] args) { + String str = "ABC123"; + System.out.println(str); + change(str); + System.out.println("After change:" + str); + } +} + +ABC123 +After change: ABC123 +이유: change메서드의 str은 지역변수이다. 따라서 메서드가 종료되면 메모리에서 제거된다. \ No newline at end of file diff --git a/src/yuyeongwoo/report7/report7_1.java b/src/yuyeongwoo/report7/report7_1.java new file mode 100644 index 0000000..5804aa2 --- /dev/null +++ b/src/yuyeongwoo/report7/report7_1.java @@ -0,0 +1,22 @@ +package yuyeongwoo.report7; +//문제 6-17번 +public class report7_1 { + public static void main(String[] args) { + int[] original = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + System.out.println(java.util.Arrays.toString(original)); + + int[] result = shuffle(original); + System.out.println(java.util.Arrays.toString(result)); + } + + public static int[] shuffle(int[] arr) { + for (int i = 0; i < arr.length; i++) { + int j = (int) (Math.random() * arr.length); + int tmp = 0; + tmp = arr[i]; + arr[i] = arr[j]; + arr[j] = tmp; + } + return arr; + } +} diff --git a/src/yuyeongwoo/report7/report7_2.java b/src/yuyeongwoo/report7/report7_2.java new file mode 100644 index 0000000..7556d03 --- /dev/null +++ b/src/yuyeongwoo/report7/report7_2.java @@ -0,0 +1,23 @@ +package yuyeongwoo.report7; +//문제 6-18번 +public class report7_2 { + public static void main(String[] args) { + String str = "123"; + System.out.println(str + " 는 숫자입니까? " + isNumber(str)); + str = "1234o"; + System.out.println(str + " 는 숫자입니까? " + isNumber(str)); + } + + public static boolean isNumber(String str) { + if (str == null || str.equals("")) { + return false; + } + for (int i = 0; i < str.length(); i++) { + int a = str.charAt(i) - '0'; + if (0 > a || a > 9) { + return false; + } + } + return true; + } +} \ No newline at end of file diff --git a/src/yuyeongwoo/report7/report7_3.java b/src/yuyeongwoo/report7/report7_3.java new file mode 100644 index 0000000..676ba5f --- /dev/null +++ b/src/yuyeongwoo/report7/report7_3.java @@ -0,0 +1,60 @@ +package yuyeongwoo.report7; +//문제 6-19번 +public class report7_3 { + public static void main(String[] args) { + MyTv t = new MyTv(); + t.channel = 100; + t.volume = 0; + System.out.println("CH:" + t.channel + ", VOL:" + t.volume); + t.channelDown(); + t.volumeDown(); + System.out.println("CH:" + t.channel + ", VOL:" + t.volume); + t.volume = 100; + t.channelUp(); + t.volumeUp(); + System.out.println("CH:" + t.channel + ", VOL:" + t.volume); + } +} +class MyTv { + boolean isPowerOn; + int channel; + int volume; + final int MAX_VOLUME = 100; + final int MIN_VOLUME = 0; + final int MAX_CHANNEL = 100; + final int MIN_CHANNEL = 1; + void turnOnOff() { + // (1) isPowerOn의 값이 true면 false로, false면 true로 바꾼다. + isPowerOn = !isPowerOn; + } + void volumeUp() { + // (2) volume의 값이 MAX_VOLUME보다 작을 때만 값을 1 증가시킨다. + if (volume < MAX_VOLUME) { + volume++; + } + } + void volumeDown() { + // (3) volume의 값이 MIN_VOLUME보다 클 때만 값을 1 감소시킨다. + if (volume > MIN_VOLUME) { + volume--; + } + } + void channelUp() { + // (4) channel의 값을 1 증가시킨다. + // 만일 channel이 MAX_CHANNEL이면 , channel의 값을 MIN_CHANNEL로 바꾼다. + if (channel == MAX_CHANNEL) { + channel = MIN_CHANNEL; + } else { + channel++; + } + } + void channelDown() { + // (5) channel의 값을 1 감소시킨다 . + // 만일 channel이 MIN_CHANNEL이면, channel의 값을 MAX_CHANNEL로 바꾼다. + if (channel == MIN_CHANNEL) { + channel = MAX_CHANNEL; + } else { + channel--; + } + } +} diff --git a/src/yuyeongwoo/report7/report7_4.java b/src/yuyeongwoo/report7/report7_4.java new file mode 100644 index 0000000..2ff9111 --- /dev/null +++ b/src/yuyeongwoo/report7/report7_4.java @@ -0,0 +1,26 @@ +package yuyeongwoo.report7; +//6-20번 +import java.util.Arrays; + +public class report7_4 { + public static void main(String[] args) { + int[] data = {3, 2, 9, 4, 7}; + System.out.println(Arrays.toString(data)); + System.out.println("최대값 : " + max(data)); + System.out.println("최대값 : " + max(null)); + System.out.println("최대값 : " + max(new int[]{})); + } + + public static int max(int[] arr) { + if (arr == null || arr.length == 0) { + return -999999; + } + int max = 0; + for (int i = 0; i < arr.length; i++) { + if (arr[i] > max) { + max = arr[i]; + } + } + return max; + } +} diff --git a/src/yuyeongwoo/report7/report7_5.java b/src/yuyeongwoo/report7/report7_5.java new file mode 100644 index 0000000..1b9cd6c --- /dev/null +++ b/src/yuyeongwoo/report7/report7_5.java @@ -0,0 +1,14 @@ +package yuyeongwoo.report7; +//6-21번 +public class report7_5 { + public static void main(String[] args) { + int value = 5; + System.out.println(value + "의 절대값 :" + abs(value)); + value = -10; + System.out.println(value + "의 절대값 :" + abs(value)); + } + + public static int abs(int value) { + return value < 0 ? -value : value; + } +} From 6c1b9d63f1d5302e420cdf75be8196e9cb49b0bf Mon Sep 17 00:00:00 2001 From: HEUKWU Date: Wed, 25 Jan 2023 11:27:35 +0900 Subject: [PATCH 6/7] =?UTF-8?q?=EC=9C=A0=EC=98=81=EC=9A=B0(yuyeongwoo)=20R?= =?UTF-8?q?eport8=20=EA=B3=BC=EC=A0=9C=20=EC=A0=9C=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/yuyeongwoo/report8/report8_1.java | 42 +++++++++++++++++++ src/yuyeongwoo/report8/report8_2.java | 59 +++++++++++++++++++++++++++ src/yuyeongwoo/report8/report8_3 | 33 +++++++++++++++ src/yuyeongwoo/report8/report8_4.java | 39 ++++++++++++++++++ src/yuyeongwoo/report8/report8_5.java | 55 +++++++++++++++++++++++++ 5 files changed, 228 insertions(+) create mode 100644 src/yuyeongwoo/report8/report8_1.java create mode 100644 src/yuyeongwoo/report8/report8_2.java create mode 100644 src/yuyeongwoo/report8/report8_3 create mode 100644 src/yuyeongwoo/report8/report8_4.java create mode 100644 src/yuyeongwoo/report8/report8_5.java diff --git a/src/yuyeongwoo/report8/report8_1.java b/src/yuyeongwoo/report8/report8_1.java new file mode 100644 index 0000000..31705bb --- /dev/null +++ b/src/yuyeongwoo/report8/report8_1.java @@ -0,0 +1,42 @@ +package yuyeongwoo.report8; +//문제 7-1번 +public class report8_1 { + public static void main(String[] args) { + SutdaDeck2 deck = new SutdaDeck2(); + for (int i = 0; i < deck.cards.length; i++) { + System.out.print(deck.cards[i] + ","); + } + } +} + +class SutdaDeck { + final int CARD_NUM = 20; + SutdaCard2[] cards = new SutdaCard2[CARD_NUM]; + + SutdaDeck() { + for (int i = 0; i < cards.length; i++) { + int a = i % 10 + 1; + boolean b = i == 0 || i == 2 || i == 7; + cards[i] = new SutdaCard2(a, b); + } + } +} + +class SutdaCard { + int num; + boolean isKwang; + + public SutdaCard(int num, boolean isKwang) { + this.num = num; + this.isKwang = isKwang; + } + + SutdaCard() { + this(1, true); + } + + @Override + public String toString() { + return num + (isKwang ? "K" : ""); + } +} diff --git a/src/yuyeongwoo/report8/report8_2.java b/src/yuyeongwoo/report8/report8_2.java new file mode 100644 index 0000000..de6d092 --- /dev/null +++ b/src/yuyeongwoo/report8/report8_2.java @@ -0,0 +1,59 @@ +package yuyeongwoo.report8; +//문제 7-2번 +public class report8_2 { + public static void main(String[] args) { + + } +} + +class SutdaDeck2 { + final int CARD_NUM = 20; + SutdaCard2[] cards = new SutdaCard2[CARD_NUM]; + + SutdaDeck2() { + for (int i = 0; i < cards.length; i++) { + int a = i % 10 + 1; + boolean b = i == 0 || i == 2 || i == 7; + cards[i] = new SutdaCard2(a, b); + } + } + + void shuffle() { + for (int i = 0; i < cards.length; i++) { + int a = (int) (Math.random() * cards.length); + + SutdaCard2 j = cards[i]; + cards[i] = cards[a]; + cards[a] = j; + } + } + + SutdaCard2 pick(int index) { + return cards[index]; + } + + SutdaCard2 pick() { + int a = (int) (Math.random() * cards.length); + return cards[a]; + } +} + +class SutdaCard2 { + int num; + boolean isKwang; + + public SutdaCard2(int num, boolean isKwang) { + this.num = num; + this.isKwang = isKwang; + } + + SutdaCard2() { + this(1, true); + } + + @Override + public String toString() { + return num + (isKwang ? "K" : ""); + } +} + diff --git a/src/yuyeongwoo/report8/report8_3 b/src/yuyeongwoo/report8/report8_3 new file mode 100644 index 0000000..a1a1306 --- /dev/null +++ b/src/yuyeongwoo/report8/report8_3 @@ -0,0 +1,33 @@ +//문제 7-3번 + +class Product { + int price; // 제품의 가격 + int bonusPoint; // 제품구매 시 제공하는 보너스점수 + + // (구현) + Product() {} <= 해결1 + + Product(int price) { + this.price = price; + bonusPoint = (int) (price / 10.0); + } +} + +class Tv extends Product { + Tv() {} <= 컴파일 에러 / 이유: Tv() 생성자가 호출되면 Tv()는 조상의 기본 생성자를 호출한다. + 하지만 조상 클래스에는 기본 생성자가 정의되어있지 않다. + (이미 다른 생성자가 정의되어있기 때문에 컴파일러가 기본 생성자를 자동 추가해주지 않는다.) + Tv() { <= 해결2 조상 클래스의 Product(int price) 생성자를 직접 호출해도 된다. + super(200) + } + public String toString() { + return "Tv"; + } +} + +class Exercise7_3 { + public static void main(String[] args) { + Tv t = new Tv(); + } +} + diff --git a/src/yuyeongwoo/report8/report8_4.java b/src/yuyeongwoo/report8/report8_4.java new file mode 100644 index 0000000..64edfb6 --- /dev/null +++ b/src/yuyeongwoo/report8/report8_4.java @@ -0,0 +1,39 @@ +package yuyeongwoo.report8; +//문제 7-4 +public class report8_4 { + public static void main(String[] args) { + MyTv t = new MyTv(); + + t.setChannel(10); + System.out.println("CH: " + t.getChannel()); + t.setVolume(20); + System.out.println("VOL: " + t.getVolume()); + } +} + +class MyTv { + private boolean isPowerOn; + private int channel; + private int volume; + + final int MAX_VOLUME = 100; + final int MIN_VOLUME = 0; + final int MAX_CHANNEL = 100; + final int MIN_CHANNEL = 1; + + public int getChannel() { + return channel; + } + + public void setChannel(int channel) { + this.channel = channel; + } + + public int getVolume() { + return volume; + } + + public void setVolume(int volume) { + this.volume = volume; + } +} diff --git a/src/yuyeongwoo/report8/report8_5.java b/src/yuyeongwoo/report8/report8_5.java new file mode 100644 index 0000000..5a4c207 --- /dev/null +++ b/src/yuyeongwoo/report8/report8_5.java @@ -0,0 +1,55 @@ +package yuyeongwoo.report8; +//문제 7-5번 +public class report8_5 { + public static void main(String[] args) { + MyTv2 t = new MyTv2(); + t.setChannel(10); + System.out.println("CH:" + t.getChannel()); + t.setChannel(20); + System.out.println("CH:" + t.getChannel()); + t.gotoPrevChannel(); + System.out.println("CH:" + t.getChannel()); + t.gotoPrevChannel(); + System.out.println("CH:" + t.getChannel()); + } +} +class MyTv2 { + private boolean isPowerOn; + private int channel; + private int volume; + // (구현) + private int prevChannel; + + final int MAX_VOLUME = 100; + final int MIN_VOLUME = 0; + final int MAX_CHANNEL = 100; + final int MIN_CHANNEL = 1; + + public void setVolume(int volume) { + if (volume > MAX_VOLUME || volume < MIN_VOLUME) + return; + this.volume = volume; + } + + public int getVolume() { + return volume; + } + + public void setChannel(int channel) { + if (channel > MAX_CHANNEL || channel < MIN_CHANNEL) + return; + + // (구현) + prevChannel = this.channel; + this.channel = channel; + } + + public int getChannel() { + return channel; + } + + // (구현) + public void gotoPrevChannel() { + setChannel(prevChannel); + } +} From ae814d9b75144d372e9038c5ab600867657f3df3 Mon Sep 17 00:00:00 2001 From: HEUKWU Date: Thu, 26 Jan 2023 10:53:18 +0900 Subject: [PATCH 7/7] =?UTF-8?q?=EC=9C=A0=EC=98=81=EC=9A=B0(yuyeongwoo)=20S?= =?UTF-8?q?OLID=20=EA=B3=BC=EC=A0=9C=20=EC=A0=9C=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../solid/dip/AbstractOperation.java | 5 ++ src/yuyeongwoo/solid/dip/AddOperation.java | 8 +++ src/yuyeongwoo/solid/dip/Calculator.java | 10 +++ src/yuyeongwoo/solid/dip/Client.java | 21 ++++++ src/yuyeongwoo/solid/dip/DivideOperation.java | 8 +++ .../solid/dip/MultiplyOperation.java | 8 +++ .../solid/dip/SubtractOperation.java | 8 +++ .../solid/isp/AbstractOperation.java | 6 ++ src/yuyeongwoo/solid/isp/AddOperation.java | 13 ++++ src/yuyeongwoo/solid/isp/Calculator.java | 7 ++ src/yuyeongwoo/solid/isp/Client.java | 14 ++++ src/yuyeongwoo/solid/isp/DisplayResult.java | 6 ++ src/yuyeongwoo/solid/isp/DisplayTypeA.java | 9 +++ src/yuyeongwoo/solid/isp/DisplayTypeB.java | 10 +++ .../solid/isp/DisplayWithOperator.java | 5 ++ src/yuyeongwoo/solid/isp/DivideOperation.java | 13 ++++ .../solid/isp/MultiplyOperation.java | 13 ++++ .../solid/isp/SubtractOperation.java | 13 ++++ .../solid/lsp/AbstractOperation.java | 7 ++ src/yuyeongwoo/solid/lsp/AddOperation.java | 14 ++++ src/yuyeongwoo/solid/lsp/Calculator.java | 7 ++ src/yuyeongwoo/solid/lsp/Client.java | 21 ++++++ src/yuyeongwoo/solid/lsp/DivideOperation.java | 19 ++++++ .../solid/lsp/MultiplyOperation.java | 14 ++++ .../solid/lsp/SubtractOperation.java | 14 ++++ src/yuyeongwoo/solid/ocp/OCP.java | 54 +++++++++++++++ src/yuyeongwoo/solid/srp/SRP.java | 67 +++++++++++++++++++ 27 files changed, 394 insertions(+) create mode 100644 src/yuyeongwoo/solid/dip/AbstractOperation.java create mode 100644 src/yuyeongwoo/solid/dip/AddOperation.java create mode 100644 src/yuyeongwoo/solid/dip/Calculator.java create mode 100644 src/yuyeongwoo/solid/dip/Client.java create mode 100644 src/yuyeongwoo/solid/dip/DivideOperation.java create mode 100644 src/yuyeongwoo/solid/dip/MultiplyOperation.java create mode 100644 src/yuyeongwoo/solid/dip/SubtractOperation.java create mode 100644 src/yuyeongwoo/solid/isp/AbstractOperation.java create mode 100644 src/yuyeongwoo/solid/isp/AddOperation.java create mode 100644 src/yuyeongwoo/solid/isp/Calculator.java create mode 100644 src/yuyeongwoo/solid/isp/Client.java create mode 100644 src/yuyeongwoo/solid/isp/DisplayResult.java create mode 100644 src/yuyeongwoo/solid/isp/DisplayTypeA.java create mode 100644 src/yuyeongwoo/solid/isp/DisplayTypeB.java create mode 100644 src/yuyeongwoo/solid/isp/DisplayWithOperator.java create mode 100644 src/yuyeongwoo/solid/isp/DivideOperation.java create mode 100644 src/yuyeongwoo/solid/isp/MultiplyOperation.java create mode 100644 src/yuyeongwoo/solid/isp/SubtractOperation.java create mode 100644 src/yuyeongwoo/solid/lsp/AbstractOperation.java create mode 100644 src/yuyeongwoo/solid/lsp/AddOperation.java create mode 100644 src/yuyeongwoo/solid/lsp/Calculator.java create mode 100644 src/yuyeongwoo/solid/lsp/Client.java create mode 100644 src/yuyeongwoo/solid/lsp/DivideOperation.java create mode 100644 src/yuyeongwoo/solid/lsp/MultiplyOperation.java create mode 100644 src/yuyeongwoo/solid/lsp/SubtractOperation.java create mode 100644 src/yuyeongwoo/solid/ocp/OCP.java create mode 100644 src/yuyeongwoo/solid/srp/SRP.java diff --git a/src/yuyeongwoo/solid/dip/AbstractOperation.java b/src/yuyeongwoo/solid/dip/AbstractOperation.java new file mode 100644 index 0000000..3fac70b --- /dev/null +++ b/src/yuyeongwoo/solid/dip/AbstractOperation.java @@ -0,0 +1,5 @@ +package yuyeongwoo.solid.dip; + +public abstract class AbstractOperation { + public abstract int operate(AbstractOperation operation, int firstNumber, int secondNumber); +} diff --git a/src/yuyeongwoo/solid/dip/AddOperation.java b/src/yuyeongwoo/solid/dip/AddOperation.java new file mode 100644 index 0000000..0452da6 --- /dev/null +++ b/src/yuyeongwoo/solid/dip/AddOperation.java @@ -0,0 +1,8 @@ +package yuyeongwoo.solid.dip; + +public class AddOperation extends AbstractOperation { + @Override + public int operate(AbstractOperation operation, int firstNumber, int secondNumber) { + return firstNumber + secondNumber; + } +} diff --git a/src/yuyeongwoo/solid/dip/Calculator.java b/src/yuyeongwoo/solid/dip/Calculator.java new file mode 100644 index 0000000..e686763 --- /dev/null +++ b/src/yuyeongwoo/solid/dip/Calculator.java @@ -0,0 +1,10 @@ +package yuyeongwoo.solid.dip; + +public class Calculator { + + AbstractOperation operation = new AddOperation(); + + int calculate(AbstractOperation operation, int firstNumber, int secondNumber) { + return operation.operate(operation, firstNumber, secondNumber); + } +} diff --git a/src/yuyeongwoo/solid/dip/Client.java b/src/yuyeongwoo/solid/dip/Client.java new file mode 100644 index 0000000..b64e5e3 --- /dev/null +++ b/src/yuyeongwoo/solid/dip/Client.java @@ -0,0 +1,21 @@ +package yuyeongwoo.solid.dip; + +public class Client { + public static void main(String[] args) { + Calculator calculator = new Calculator(); + int firstNumber = 4; + int secondNumber = 2; + + int answer = calculator.calculate(new AddOperation(), firstNumber, secondNumber); + System.out.println(firstNumber + " + " + secondNumber + " = " + answer); + + answer = calculator.calculate(new SubtractOperation(), firstNumber, secondNumber); + System.out.println(firstNumber + " - " + secondNumber + " = " + answer); + + answer = calculator.calculate(new MultiplyOperation(), firstNumber, secondNumber); + System.out.println(firstNumber + " * " + secondNumber + " = " + answer); + + answer = calculator.calculate(new DivideOperation(), firstNumber, secondNumber); + System.out.println(firstNumber + " / " + secondNumber + " = " + answer); + } +} diff --git a/src/yuyeongwoo/solid/dip/DivideOperation.java b/src/yuyeongwoo/solid/dip/DivideOperation.java new file mode 100644 index 0000000..8bd6013 --- /dev/null +++ b/src/yuyeongwoo/solid/dip/DivideOperation.java @@ -0,0 +1,8 @@ +package yuyeongwoo.solid.dip; + +public class DivideOperation extends AbstractOperation { + @Override + public int operate(AbstractOperation operation, int firstNumber, int secondNumber) { + return firstNumber / secondNumber; + } +} diff --git a/src/yuyeongwoo/solid/dip/MultiplyOperation.java b/src/yuyeongwoo/solid/dip/MultiplyOperation.java new file mode 100644 index 0000000..204cc75 --- /dev/null +++ b/src/yuyeongwoo/solid/dip/MultiplyOperation.java @@ -0,0 +1,8 @@ +package yuyeongwoo.solid.dip; + +public class MultiplyOperation extends AbstractOperation { + @Override + public int operate(AbstractOperation operation, int firstNumber, int secondNumber) { + return firstNumber * secondNumber; + } +} diff --git a/src/yuyeongwoo/solid/dip/SubtractOperation.java b/src/yuyeongwoo/solid/dip/SubtractOperation.java new file mode 100644 index 0000000..df5fb8f --- /dev/null +++ b/src/yuyeongwoo/solid/dip/SubtractOperation.java @@ -0,0 +1,8 @@ +package yuyeongwoo.solid.dip; + +public class SubtractOperation extends AbstractOperation{ + @Override + public int operate(AbstractOperation operation, int firstNumber, int secondNumber) { + return firstNumber - secondNumber; + } +} diff --git a/src/yuyeongwoo/solid/isp/AbstractOperation.java b/src/yuyeongwoo/solid/isp/AbstractOperation.java new file mode 100644 index 0000000..6ebd4ad --- /dev/null +++ b/src/yuyeongwoo/solid/isp/AbstractOperation.java @@ -0,0 +1,6 @@ +package yuyeongwoo.solid.isp; + +public abstract class AbstractOperation { + public abstract int operate(int firstNumber, int secondNumber); + public abstract String getOperator(); +} diff --git a/src/yuyeongwoo/solid/isp/AddOperation.java b/src/yuyeongwoo/solid/isp/AddOperation.java new file mode 100644 index 0000000..7c5bf91 --- /dev/null +++ b/src/yuyeongwoo/solid/isp/AddOperation.java @@ -0,0 +1,13 @@ +package yuyeongwoo.solid.isp; + +public class AddOperation extends AbstractOperation { + @Override + public int operate(int firstNumber, int secondNumber) { + return firstNumber + secondNumber; + } + + @Override + public String getOperator() { + return "+"; + } +} diff --git a/src/yuyeongwoo/solid/isp/Calculator.java b/src/yuyeongwoo/solid/isp/Calculator.java new file mode 100644 index 0000000..1db166a --- /dev/null +++ b/src/yuyeongwoo/solid/isp/Calculator.java @@ -0,0 +1,7 @@ +package yuyeongwoo.solid.isp; + +public class Calculator { + public int calculate(AbstractOperation operation, int firstNumber, int secondNumber){ + return operation.operate(firstNumber, secondNumber); + } +} diff --git a/src/yuyeongwoo/solid/isp/Client.java b/src/yuyeongwoo/solid/isp/Client.java new file mode 100644 index 0000000..3a3c59c --- /dev/null +++ b/src/yuyeongwoo/solid/isp/Client.java @@ -0,0 +1,14 @@ +package yuyeongwoo.solid.isp; + +public class Client { + public static void main(String[] args) { + int firNum = 140; + int secNum = 60; + + DisplayResult displayResult = new DisplayTypeA(); + displayResult.displayResult(new AddOperation(), firNum, secNum); + + DisplayWithOperator displayWithOperator = new DisplayTypeB(); + displayWithOperator.displayResultWithOperator(new AddOperation(), firNum, secNum); + } +} diff --git a/src/yuyeongwoo/solid/isp/DisplayResult.java b/src/yuyeongwoo/solid/isp/DisplayResult.java new file mode 100644 index 0000000..1d03774 --- /dev/null +++ b/src/yuyeongwoo/solid/isp/DisplayResult.java @@ -0,0 +1,6 @@ +package yuyeongwoo.solid.isp; + +public interface DisplayResult { + void displayResult(AbstractOperation operation, int firstNumber, int secondNumber); + +} diff --git a/src/yuyeongwoo/solid/isp/DisplayTypeA.java b/src/yuyeongwoo/solid/isp/DisplayTypeA.java new file mode 100644 index 0000000..a4d192c --- /dev/null +++ b/src/yuyeongwoo/solid/isp/DisplayTypeA.java @@ -0,0 +1,9 @@ +package yuyeongwoo.solid.isp; + +public class DisplayTypeA extends Calculator implements DisplayResult { + @Override + public void displayResult(AbstractOperation operation, int firstNumber, int secondNumber) { + int answer = operation.operate(firstNumber, secondNumber); + System.out.println(answer); + } +} diff --git a/src/yuyeongwoo/solid/isp/DisplayTypeB.java b/src/yuyeongwoo/solid/isp/DisplayTypeB.java new file mode 100644 index 0000000..5895644 --- /dev/null +++ b/src/yuyeongwoo/solid/isp/DisplayTypeB.java @@ -0,0 +1,10 @@ +package yuyeongwoo.solid.isp; + +public class DisplayTypeB extends Calculator implements DisplayWithOperator { + @Override + public void displayResultWithOperator(AbstractOperation operation, int firstNumber, int secondNumber) { + int answer = operation.operate(firstNumber, secondNumber); + String operator = operation.getOperator(); + System.out.println(firstNumber + " " + operator + " " + secondNumber + " = " + answer); + } +} diff --git a/src/yuyeongwoo/solid/isp/DisplayWithOperator.java b/src/yuyeongwoo/solid/isp/DisplayWithOperator.java new file mode 100644 index 0000000..d497348 --- /dev/null +++ b/src/yuyeongwoo/solid/isp/DisplayWithOperator.java @@ -0,0 +1,5 @@ +package yuyeongwoo.solid.isp; + +public interface DisplayWithOperator { + void displayResultWithOperator(AbstractOperation operation, int firstNumber, int secondNumber); +} diff --git a/src/yuyeongwoo/solid/isp/DivideOperation.java b/src/yuyeongwoo/solid/isp/DivideOperation.java new file mode 100644 index 0000000..5cd0f18 --- /dev/null +++ b/src/yuyeongwoo/solid/isp/DivideOperation.java @@ -0,0 +1,13 @@ +package yuyeongwoo.solid.isp; + +public class DivideOperation extends AbstractOperation { + @Override + public int operate(int firstNumber, int secondNumber) { + return firstNumber / secondNumber; + } + + @Override + public String getOperator() { + return "/"; + } +} diff --git a/src/yuyeongwoo/solid/isp/MultiplyOperation.java b/src/yuyeongwoo/solid/isp/MultiplyOperation.java new file mode 100644 index 0000000..1c569bb --- /dev/null +++ b/src/yuyeongwoo/solid/isp/MultiplyOperation.java @@ -0,0 +1,13 @@ +package yuyeongwoo.solid.isp; + +public class MultiplyOperation extends AbstractOperation { + @Override + public int operate(int firstNumber, int secondNumber) { + return firstNumber * secondNumber; + } + + @Override + public String getOperator() { + return "*"; + } +} diff --git a/src/yuyeongwoo/solid/isp/SubtractOperation.java b/src/yuyeongwoo/solid/isp/SubtractOperation.java new file mode 100644 index 0000000..534913a --- /dev/null +++ b/src/yuyeongwoo/solid/isp/SubtractOperation.java @@ -0,0 +1,13 @@ +package yuyeongwoo.solid.isp; + +public class SubtractOperation extends AbstractOperation { + @Override + public int operate(int firstNumber, int secondNumber) { + return firstNumber - secondNumber; + } + + @Override + public String getOperator() { + return "-"; + } +} diff --git a/src/yuyeongwoo/solid/lsp/AbstractOperation.java b/src/yuyeongwoo/solid/lsp/AbstractOperation.java new file mode 100644 index 0000000..a92dda3 --- /dev/null +++ b/src/yuyeongwoo/solid/lsp/AbstractOperation.java @@ -0,0 +1,7 @@ +package yuyeongwoo.solid.lsp; + +public abstract class AbstractOperation { + abstract int operate(int firstNumber, int secondNumber); + + abstract int isInvalid(AbstractOperation operation, int firstNumber, int secondNumber); +} diff --git a/src/yuyeongwoo/solid/lsp/AddOperation.java b/src/yuyeongwoo/solid/lsp/AddOperation.java new file mode 100644 index 0000000..efb6960 --- /dev/null +++ b/src/yuyeongwoo/solid/lsp/AddOperation.java @@ -0,0 +1,14 @@ +package yuyeongwoo.solid.lsp; + +public class AddOperation extends AbstractOperation { + + @Override + public int operate(int firstNumber, int secondNumber) { + return firstNumber + secondNumber; + } + + @Override + public int isInvalid(AbstractOperation operation, int firstNumber, int secondNumber) { + return operation.operate(firstNumber, secondNumber); + } +} diff --git a/src/yuyeongwoo/solid/lsp/Calculator.java b/src/yuyeongwoo/solid/lsp/Calculator.java new file mode 100644 index 0000000..ed0e81a --- /dev/null +++ b/src/yuyeongwoo/solid/lsp/Calculator.java @@ -0,0 +1,7 @@ +package yuyeongwoo.solid.lsp; + +public class Calculator { + public int calculate(AbstractOperation operation, int firstNumber, int secondNumber) { + return operation.isInvalid(operation, firstNumber, secondNumber); + } +} diff --git a/src/yuyeongwoo/solid/lsp/Client.java b/src/yuyeongwoo/solid/lsp/Client.java new file mode 100644 index 0000000..cdec845 --- /dev/null +++ b/src/yuyeongwoo/solid/lsp/Client.java @@ -0,0 +1,21 @@ +package yuyeongwoo.solid.lsp; + +public class Client { + public static void main(String[] args) { + Calculator calculator = new Calculator(); + int firNum = 4; + int secNum = 2; + + int answer = calculator.calculate(new AddOperation(), firNum, secNum); + System.out.println(firNum + " + " + secNum + " = " + answer); + + answer = calculator.calculate(new SubtractOperation(), firNum, secNum); + System.out.println(firNum + " - " + secNum + " = " + answer); + + answer = calculator.calculate(new MultiplyOperation(), firNum, secNum); + System.out.println(firNum + " * " + secNum + " = " + answer); + + answer = calculator.calculate(new DivideOperation(), firNum, secNum); + System.out.println(firNum + " / " + secNum + " = " + answer); + } +} diff --git a/src/yuyeongwoo/solid/lsp/DivideOperation.java b/src/yuyeongwoo/solid/lsp/DivideOperation.java new file mode 100644 index 0000000..131c018 --- /dev/null +++ b/src/yuyeongwoo/solid/lsp/DivideOperation.java @@ -0,0 +1,19 @@ +package yuyeongwoo.solid.lsp; + +public class DivideOperation extends AbstractOperation { + + @Override + public int operate(int firstNumber, int secondNumber) { + return firstNumber / secondNumber; + } + + @Override + public int isInvalid(AbstractOperation operation, int firstNumber, int secondNumber) { + if (operation instanceof DivideOperation) { + if (secondNumber == 0) { + return -9999; + } + } + return operation.operate(firstNumber, secondNumber); + } +} diff --git a/src/yuyeongwoo/solid/lsp/MultiplyOperation.java b/src/yuyeongwoo/solid/lsp/MultiplyOperation.java new file mode 100644 index 0000000..17aa1db --- /dev/null +++ b/src/yuyeongwoo/solid/lsp/MultiplyOperation.java @@ -0,0 +1,14 @@ +package yuyeongwoo.solid.lsp; + +public class MultiplyOperation extends AbstractOperation { + + @Override + public int operate(int firstNumber, int secondNumber) { + return firstNumber * secondNumber; + } + + @Override + public int isInvalid(AbstractOperation operation, int firstNumber, int secondNumber) { + return operation.operate(firstNumber, secondNumber); + } +} diff --git a/src/yuyeongwoo/solid/lsp/SubtractOperation.java b/src/yuyeongwoo/solid/lsp/SubtractOperation.java new file mode 100644 index 0000000..19aa47b --- /dev/null +++ b/src/yuyeongwoo/solid/lsp/SubtractOperation.java @@ -0,0 +1,14 @@ +package yuyeongwoo.solid.lsp; + +public class SubtractOperation extends AbstractOperation { + + @Override + public int operate(int firstNumber, int secondNumber) { + return firstNumber - secondNumber; + } + + @Override + public int isInvalid(AbstractOperation operation, int firstNumber, int secondNumber) { + return operation.operate(firstNumber, secondNumber); + } +} diff --git a/src/yuyeongwoo/solid/ocp/OCP.java b/src/yuyeongwoo/solid/ocp/OCP.java new file mode 100644 index 0000000..cdd5079 --- /dev/null +++ b/src/yuyeongwoo/solid/ocp/OCP.java @@ -0,0 +1,54 @@ +package yuyeongwoo.solid.ocp; + +public class OCP { + public static void main(String[] args) { + Calculator calculator = new Calculator(); + int firNum = 4; + int secNum = 2; + calculator.calculate(new AddOperation(), firNum, secNum); + calculator.calculate(new SubtractOperation(), firNum, secNum); + calculator.calculate(new MultiplyOperation(), firNum, secNum); + calculator.calculate(new DivideOperation(), firNum, secNum); + } +} + +class Calculator { + public void calculate(AbstractOperation operation, int firstNumber, int secondNumber) { + operation.operate(firstNumber, secondNumber); + } +} + +abstract class AbstractOperation { + abstract void operate(int firstNumber, int secondNumber); +} + +class AddOperation extends AbstractOperation { + + @Override + public void operate(int firstNumber, int secondNumber) { + System.out.println(firstNumber + " + " + secondNumber + " = " + (firstNumber + secondNumber)); + } +} + +class SubtractOperation extends AbstractOperation { + + @Override + public void operate(int firstNumber, int secondNumber) { + System.out.println(firstNumber + " - " + secondNumber + " = " + (firstNumber - secondNumber)); } +} + +class MultiplyOperation extends AbstractOperation { + + @Override + public void operate(int firstNumber, int secondNumber) { + System.out.println(firstNumber + " * " + secondNumber + " = " + (firstNumber * secondNumber)); + } +} + +class DivideOperation extends AbstractOperation { + + @Override + public void operate(int firstNumber, int secondNumber) { + System.out.println(firstNumber + " / " + secondNumber + " = " + (firstNumber / secondNumber)); + } +} \ No newline at end of file diff --git a/src/yuyeongwoo/solid/srp/SRP.java b/src/yuyeongwoo/solid/srp/SRP.java new file mode 100644 index 0000000..8c52638 --- /dev/null +++ b/src/yuyeongwoo/solid/srp/SRP.java @@ -0,0 +1,67 @@ +package yuyeongwoo.solid.srp; + +public class SRP { + public static void main(String[] args) { + Calculator calculator = new Calculator(new AddOperation(), new SubtractOperation(), new MultiplyOperation(), new DivideOperation()); + int firNum = 4; + int secNum = 2; + calculator.add(firNum, secNum); + calculator.divide(firNum, secNum); + calculator.subtract(firNum, secNum); + calculator.multiply(firNum, secNum); + } +} + +class Calculator { + AddOperation add; + SubtractOperation subtract; + MultiplyOperation multiply; + DivideOperation divide; + + public Calculator(AddOperation add, SubtractOperation subtract, MultiplyOperation multiply, DivideOperation divide) { + this.add = add; + this.subtract = subtract; + this.multiply = multiply; + this.divide = divide; + } + + public void add(int firstNumber, int secondNumber) { + add.operate(firstNumber, secondNumber); + } + + public void subtract(int firstNumber, int secondNumber) { + subtract.operate(firstNumber, secondNumber); + } + + public void multiply(int firstNumber, int secondNumber) { + multiply.operate(firstNumber, secondNumber); + } + + public void divide(int firstNumber, int secondNumber) { + divide.operate(firstNumber, secondNumber); + } +} + +class AddOperation { + + public void operate(int firstNumber, int secondNumber) { + System.out.println(firstNumber + " + " + secondNumber + " = " + (firstNumber + secondNumber)); + } +} + +class SubtractOperation { + public void operate(int firstNumber, int secondNumber) { + System.out.println(firstNumber + " - " + secondNumber + " = " + (firstNumber - secondNumber)); } +} + +class MultiplyOperation { + public void operate(int firstNumber, int secondNumber) { + System.out.println(firstNumber + " * " + secondNumber + " = " + (firstNumber * secondNumber)); + } +} + +class DivideOperation { + public void operate(int firstNumber, int secondNumber) { + System.out.println(firstNumber + " / " + secondNumber + " = " + (firstNumber / secondNumber)); + } +}