Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
56e476a
feat: 클래스와 인스턴스 수업
junsuk5 Jun 10, 2025
751a63a
feat: 클레릭 클래스 작성
junsuk5 Jun 16, 2025
2722a75
feat: 클래스 수업
junsuk5 Jun 16, 2025
c049ad5
feat: 클레릭 클래스의 maxHp,maxMp 를 static 으로 선언
junsuk5 Jun 17, 2025
20a719e
feat: 클레릭 클래스의 생성자 추가
junsuk5 Jun 17, 2025
3b3b2ad
refactor: 생성자 중복 코드 재사용하도록 수정
junsuk5 Jun 17, 2025
64c2521
feat: 캡슐화 수업
junsuk5 Jun 17, 2025
97aa683
feat: 캡슐화 Wand, Wizard 과제
junsuk5 Jun 23, 2025
bc3e5ac
feat: 캡슐화 Wand, Wizard 과제 생성자 수정
junsuk5 Jun 23, 2025
a0fa117
feat: 캡슐화 Person 클래스
junsuk5 Jun 23, 2025
7cd2da6
feat: 상속 수업
junsuk5 Jun 23, 2025
8e6ae5e
feat: 상속 과제 리뷰
junsuk5 Jun 24, 2025
7f046c8
feat: 추상클래스, Interface 수업
junsuk5 Jun 24, 2025
e1dc083
feat: 추상클래스, Interface 과제 1
junsuk5 Jun 30, 2025
203ff50
feat: 추상클래스, Interface 과제 2
junsuk5 Jun 30, 2025
bcd1e25
feat: 추상클래스, Interface 과제 3~4
junsuk5 Jun 30, 2025
48daf37
feat: 추상클래스, Interface 과제 3~4 업데이트
junsuk5 Jun 30, 2025
07ca7e2
feat: 다형성
junsuk5 Jul 1, 2025
dad9205
feat: 제네릭, enum
junsuk5 Jul 1, 2025
ecd6fe6
feat: enum 코드 수정
junsuk5 Jul 1, 2025
cff74ae
README.md 파일 추가
choiain Jun 9, 2025
70ac8c3
TIL 용어정리
choiain Jun 9, 2025
f77449a
test code
choiain Jun 15, 2025
e6a99ee
2025.06.16 수업 hero, sword, wizard
choiain Jun 16, 2025
61d04c9
2025.06.16 과제 Cleric & testcode 작성
choiain Jun 16, 2025
bebbc74
Update 2025.06.16 JAVA 클래스.md
choiain Jun 16, 2025
6a56fc7
2025.06.17 수업
choiain Jun 17, 2025
70d34c8
캡슐화
choiain Jun 19, 2025
e6a4d98
오늘 수업 및 과제
choiain Jun 23, 2025
2545541
추상 클래스, 인터페이스
choiain Jun 24, 2025
493799a
2025.06.30 수업
choiain Jun 30, 2025
4361b4d
Push
choiain Jul 1, 2025
25dbd46
정리하기git add .git add .
choiain Jul 1, 2025
d01d0dc
열거형 StrongBox
choiain Jul 1, 2025
f6676f0
07.07 수업
choiain Jul 7, 2025
3a82494
과제 - Book 클래스
choiain Jul 7, 2025
af14193
과제중..
choiain Jul 7, 2025
7f568a5
git branch issue1 커밋
choiain Jul 8, 2025
7056b34
커밋
choiain Jul 8, 2025
d2c4d1a
과장님 브랜치 수정하기
choiain Jul 8, 2025
9ea209a
부장님 브랜치 수정사항
choiain Jul 8, 2025
a5fa905
.md파일 정리추가
choiain Jul 8, 2025
f7fe997
충돌 수정
choiain Jul 8, 2025
67658b7
Merge branch '과장님'
choiain Jul 8, 2025
ae9c864
수정
choiain Jul 8, 2025
d75fe77
txt파일 만들기
choiain Jul 8, 2025
91cd111
git 정리
choiain Jul 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ bin/
### Mac OS ###
.DS_Store

.idea/
.idea/
.claude/
CLAUDE.md
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 저는 최아인입니다

이 레포지토리는 JAVA 과제를 작성하는 곳입니다.
65 changes: 65 additions & 0 deletions TIL/topics/java_basic/2025.06 4주.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

# TIL 25.06.23 (Today I Learned)

## 상속 (inheritance)
이전에 만든 클래스와 닮았지만, 일부 다른 클래스를 만들 때

public class 자식 클래스 extends 부모 클래스

자바는 다중상속을 허용하지 않는다.


## 오버라이드 (Override)


## 구제화와 일반화의 관계
자식 클래스 일 수록 구체화
부모 클래스 일 수록 추상적인 것으로 일반화 된다.


# TIL 25.06.24 (Today I Learned)

## 추상 클래스
상속의 재료로 사용 되는 클래스
상세 부분이 일부 미정인 클래스
인스턴스화가 금지되어 있다.

### 추상 메소드
추상 메소드를 가지려면 반드시 추상 클래스여야 한다.

public abstract class Character {

public abstract void attack(Hero hero) {

}
}
Comment on lines +30 to +35
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

추상 메서드 구문 오류를 수정하세요.

추상 메서드는 구현부가 없어야 합니다. 현재 코드는 빈 구현부를 가지고 있어 컴파일 오류가 발생합니다.

     public abstract class Character {
         
-        public abstract void attack(Hero hero) {
-        
-        }
+        public abstract void attack(Hero hero);
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public abstract class Character {
public abstract void attack(Hero hero) {
}
}
public abstract class Character {
public abstract void attack(Hero hero);
}
🤖 Prompt for AI Agents
In TIL/topics/java_basic/2025.06 4주.md around lines 30 to 35, the abstract
method attack in the Character class incorrectly includes an empty
implementation block, causing a compilation error. Remove the method body (the
curly braces and any code inside) from the abstract method declaration so that
it only declares the method signature ending with a semicolon.


### 그림에서도 abstract 추가하기

## 인터페이스
모든 메소드는 추상 메소드 여야 한다.
필드를 가지지 않는다

public interface Creature {
// public static final 이 생략
double PI = 3.14;
void run();
}

interface.

public class Hero implements Attackable {
protected String name;
protected int hp;

@Override
public void attack(Slime slime) {
System.out.ptintln(name + "이 공격했다");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

오타를 수정하세요.

"ptintln"을 "println"으로 수정해야 합니다.

-            System.out.ptintln(name + "이 공격했다");
+            System.out.println(name + "이 공격했다");
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
System.out.ptintln(name + "이 공격했다");
System.out.println(name + "이 공격했다");
🤖 Prompt for AI Agents
In TIL/topics/java_basic/2025.06 4주.md at line 57, there is a typo in the method
name "ptintln". Correct this by changing "System.out.ptintln" to
"System.out.println" to fix the compilation error.

hp -= 10;
}
Comment on lines +56 to +59
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

인터페이스 구현 예제를 수정하세요.

Hero 클래스가 Attackable 인터페이스를 구현한다고 했지만, 실제로는 Creature 인터페이스를 정의했습니다. 일관성을 위해 수정이 필요합니다.

-    public class Hero implements Attackable {
+    public class Hero implements Creature {
         protected String name;
         protected int hp;
 
         @Override
-        public void attack(Slime slime) {
+        public void run() {
             System.out.println(name + "이 공격했다");
-            hp -= 10;
         }
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public void attack(Slime slime) {
System.out.ptintln(name + "이 공격했다");
hp -= 10;
}
public class Hero implements Creature {
protected String name;
protected int hp;
@Override
public void run() {
System.out.println(name + "이 공격했다");
}
}
🤖 Prompt for AI Agents
In TIL/topics/java_basic/2025.06 4주.md around lines 56 to 59, the Hero class is
said to implement the Attackable interface but actually defines the Creature
interface. To fix this, update the Hero class to implement the Attackable
interface consistently and ensure the method signatures match the Attackable
interface definition.

}

인터페이스간의 상속 가능

interface / implements

27 changes: 27 additions & 0 deletions TIL/topics/java_basic/2025.06.10 JAVA기초.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# TIL(Today I Learned)

## 객체지향이 필요한이유
- 컴퓨터의 발전으로? 성능이 좋아져서 메모리 관리의 의미가 없다?
-

## 용어 정리
- 오브젝트 (object) - 현실 세계의 모든 객체
- 클래스 (class) - 오브젝트를 가상세계 용으로 구체화 한것
- 인스턴스 (instance) - 클래스를 활용해 메모리 상에 만들어 낸 것


## 정리
- this. - 위에 같은 이름?을 사용 할때 내--이다 같은 의미?


## 클래스명과 맵버변수명의 명명 규칙


## 클래스 정의에 따른 효과
1. 정의한 클래스로 인스턴스를 생성 할 수 있다.
2. 이 클래스로 생성한 인스턴스를 넣을 수 있는 새로운 변수의 타입이 이용 가능 해 진다.
-Hero 클래스를 정의하면 Hero 타입의 변수가 이용 가능
3.


## Test 작성
75 changes: 75 additions & 0 deletions TIL/topics/java_basic/2025.06.16 JAVA 클래스.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# TIL(Today I Learned)

## 클래스
가상세계 - 컴퓨터의 메모리 영역
인스턴스 - heap 영역 안에 확보된 메모리

### 참조
기본형, 참조형

### 메모리
<img width="893" alt="스크린샷 2025-06-16 오후 2 08 42" src="https://github.com/user-attachments/assets/31a91f55-1366-4ca3-9bb0-a92817d91277" />

오버로드

null 이 안들어가는것 - 기본형
String은 참조형이다? 기본형이다? 참조형이다. new도 없고 null도 안들어간다.
기본형은 모두 소문자로 제공?이 된다.
필드에 초기값을 자동 생성하도록 생성자를 자동으로 생성하자?
Sword.Java
Hero.Java
Wizard.Java

null과 0이 나와요.
세팅을 하고 싶어 HP = 100 으로 하고 싶다.
생성자를 통해서 생성하는 방법
객체지향 컨셉
디폴트값을 주는 것도 좋지만 생성자를 활용하자
클래스 이름하고 똑같은 것을 만들고요
객체지향 컨셉에서
역활과 책임?
생성자 이후의 후속 조치를
생성자 동작 확인
요렇게 초기값관련된것을 초기값으로 넘기죠
이름은 외부에서 받자
받은거를 여기???에 쓰고 싶다. this.활용
오버로드는 메서드?에 관련한?
생성자에도 활용

모든 클래스는 1개이상의 생성자를 가진다.
생성자를 추가하면 기본 생성자가 날라간다.
생성자가 여러개가 있어
있는데
재활용? 기본 생성자
this를 안쓰면 기본 생성자를 부른다.

여러 히어로들이 같이 모험을 다니고 히어로마다 각각 돈을 가지고 있다.
static 공유한다.
히어로 에다가 돈을 추가할께요
int money하면 각각의 자원이야
그런데 static하면 공유한다고 하는거야..
hero1.money 하면

static을 붙이면 내께 아니야 메모리 자체가 달라!!
클래스 안에 작성은 해야해
code 아님 data에 있어

Heap에 등장을 하잖아
다 지웠어 얘만 남겨도 잘 동작을 하고

static은 메모리에 먼저 올라가 사용하는 시점에
그리고 메모리는 계속 유지가 됩니다. 끝날때까지?
해지가 안됨.
객체와 상관이 없어요. 임의로 어디서나 사용하기 위해서 쓰는 건데

무분별하게 사용하지 말기 특수하게 사용하는거?!!
final static int

money = new Random(). nextInt(1000);
name을 고치고 싶어 이거 왜 안될까?
다른 동네여서!! static 사용해서!!
그럼 어떻게 접근할까? Hero를 하나 만들어서 hero.name 으로 접근하기

여기 안보여 다른 공간이여서
요즘은 다른 파일에 작성하도록 하지 자바나 C#은 옛날 언어여서

78 changes: 78 additions & 0 deletions TIL/topics/java_basic/2025.06.17 .md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@

# TIL(Today I Learned)

## Test Code
- assertEquals(); / assertNotEquals();
두 값이 같은지/다른지 확인
- assertSame(); / assertNotSame();
두 객체의 참조가 같은지/다른지 확인
- assertTrue(); / assertFalse();
조건이 true/false 인지 확인
- assertNull(); / assertNotNull()
객체가 null이 인지/아닌지 확인
- assertArrayEquals();
두 배열이 같은지 확인
- assertThrows(Exception.class, () -> { ... });
예외 발생 여부 확인

## commit 메세지
- feat: 새로운 기능 추가
- fix: 버그 수정
- docs: 문서 수정
- style: 코드 스타일 수정
- design: 사용자 UI 디자인 변경
- test: 테스트 코드
- refactor: 코드 수정
- build: 빌드 파일 수정
- ci: CI 설정 파일 수정
- perf: 성능 개선
- chore: 빌드 업무 수정, 패키지 매니저 수정
- rename: 파일 혹은 풀더 명을 수정만 한 경우
- remove: 파일을 삭제만 한 경우


## 객체 지향의 3대 원칙 (4대의 경우 추상화 포함)
- 캡슐화 (encapsulation)
- 상속
- 다양성
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

용어 수정 필요

객체지향의 3대 원칙에서 "다양성"은 "다형성(polymorphism)"이 정확한 용어입니다.

- - 다양성
+ - 다형성 (polymorphism)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- 다양성
- 다형성 (polymorphism)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

37-37: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)

🤖 Prompt for AI Agents
In TIL/topics/java_basic/2025.06.17 .md at line 37, the term "다양성" is used
incorrectly for one of the three main principles of object-oriented programming.
Replace "다양성" with the correct term "다형성(polymorphism)" to accurately reflect
the concept.


오버 로드
없앨 수 없다.
안전한 클래스를 만들어야 하는데!!

필드에 있는 맴버 변수 함수

접근 지정자
private - 필드
public - 메소드
package private (default)
protected

UML(Unified Modeling Language)

getter와 setter
getter - 읽기 전용
setter - 쓰기 전용

보일러 플레이트

## 자료 구조
동적 배열(Array)

연결 리스트(List)
- 단순 연결 리스트

스택(Stack)

큐(Queue)

## 컬렉션
List -
Map -
Set -

Iterator<String> it = names.iterator;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

문법 오류 수정

Iterator 사용 예제에 문법 오류가 있습니다.

-Iterator<String> it = names.iterator;
+Iterator<String> it = names.iterator();
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Iterator<String> it = names.iterator;
Iterator<String> it = names.iterator();
🤖 Prompt for AI Agents
In TIL/topics/java_basic/2025.06.17 .md at line 74, the Iterator initialization
has a syntax error; it should call the iterator method with parentheses. Fix it
by changing 'names.iterator' to 'names.iterator()' to correctly obtain the
iterator instance.


HashSet - 컨테인즈
HashMap - 빠르다

28 changes: 28 additions & 0 deletions TIL/topics/java_basic/2025.07 1주.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# TIL 25.06.30 (Today I Learned)

## 다형성

어떤 것을 이렇게도 부를 수 있고, 저렇게도 부를 수 있는 것

### 공통 메소드를 통합

- house.draw()
- dog.draw()
- car.draw()

## Interface 정의

# TIL 25.07.01 (Today I Learned)

## 제네릭 (Generic)

타입을 나중에 원하는 형태로 정의 할 수 있음

## 열거형 (enum)

정해 둔 값만 넣어둘 수 있는 타입

## 이너클래스 (Inner class)

클래스 안에 정의하는 클래스

Loading