Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ba8420f
firstsetting
thisis-joe Dec 19, 2024
1c57815
feat: Lv1 구현(#1)
thisis-joe Dec 20, 2024
e783cef
Merge pull request #2 from thisis-joe/lv1
thisis-joe Dec 20, 2024
774d14c
feat: Lv2 구현(#2)
thisis-joe Dec 23, 2024
245eaca
Merge pull request #3 from thisis-joe/lv2
thisis-joe Dec 23, 2024
f7d0939
feat: Lv3 구현(#5)
thisis-joe Dec 23, 2024
82ce0b4
Merge pull request #5 from thisis-joe/lv3
thisis-joe Dec 23, 2024
a4a36b3
feat: Lv4 구현(#6)
thisis-joe Dec 23, 2024
3c22a00
Merge pull request #6 from thisis-joe/lv4
thisis-joe Dec 23, 2024
3ad8a6d
feat: Lv5 구현(#7)
thisis-joe Dec 23, 2024
e38e202
Merge pull request #7 from thisis-joe/lv5
thisis-joe Dec 23, 2024
f05ae42
feat: Lv6 구현(#8)
thisis-joe Dec 23, 2024
6a58b91
Merge pull request #8 from thisis-joe/lv6
thisis-joe Dec 23, 2024
aeacce5
feat: Lv7 구현, refac: Lv6 삭제 로직 예외처리 및 람다식 적용 (#9)
thisis-joe Dec 23, 2024
a946ae3
Merge pull request #9 from thisis-joe/lv7
thisis-joe Dec 23, 2024
0394350
feat: Lv8 구현 & 생성자 초기화 부분 오류 수정 (#10)
thisis-joe Dec 24, 2024
84ef62b
Merge pull request #10 from thisis-joe/lv8
thisis-joe Dec 24, 2024
07aacbd
refac: Lv8 - function method divided(#12)
thisis-joe Jan 2, 2025
ae4442b
refac: Lv8 - file divided(#12)
thisis-joe Jan 2, 2025
6fe15a2
refac: Lv8 - file divided & MVC(#12)
thisis-joe Jan 2, 2025
e2195ad
Merge pull request #12 from thisis-joe/lv9
thisis-joe Jan 2, 2025
4e656e3
feat: Lv9 - WiseSayingFileRepository added / preparing for LV9 (#13)
thisis-joe Jan 2, 2025
054baa0
Merge pull request #13 from thisis-joe/lv9
thisis-joe Jan 2, 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
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.example</groupId>
<artifactId>codereview</artifactId>
<version>1.0-SNAPSHOT</version>



<properties>
<maven.compiler.source>23</maven.compiler.source>
<maven.compiler.target>23</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>23</source>
<target>23</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
46 changes: 46 additions & 0 deletions src/main/java/org/example/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package org.example;
import org.example.wiseSaying.WiseSayingController;
import org.example.wiseSaying.SystemController;

import java.util.Scanner;

public class App {

private final WiseSayingController wiseSayingController;
private final SystemController systemController;
private final Scanner scanner;

public App() {
scanner = new Scanner(System.in);
wiseSayingController = new WiseSayingController(scanner);
systemController = new SystemController();
}

public void run() {

wiseSayingController.makeTestData();

System.out.println("== 명언 앱 ==");
while (true) {
System.out.print("명령) ");
String command = scanner.nextLine();

if (command.equals("종료")) {
systemController.exit();
break;
} else if (command.equals("등록")) {
wiseSayingController.writeWiseSaying();
} else if (command.equals("목록")) {
wiseSayingController.printWiseSayingList();
} else if (command.startsWith("삭제?id=")) {
String strId = command.substring(6);
int id = Integer.parseInt(strId);
wiseSayingController.deleteWiseSaying(id);
} else if (command.startsWith("수정?id=")) {
String strId = command.substring(6);
int id = Integer.parseInt(strId);
wiseSayingController.updateWiseSaying(id);
}
}
}
}
11 changes: 11 additions & 0 deletions src/main/java/org/example/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.example;

//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
public static void main(String[] args) {

App app = new App();
app.run();
}
}
4 changes: 4 additions & 0 deletions src/main/java/org/example/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.example;

public class Test {
}
9 changes: 9 additions & 0 deletions src/main/java/org/example/wiseSaying/SystemController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.example.wiseSaying;


public class SystemController {

public void exit() {
System.out.println("명언 앱을 종료합니다.");
}
}
38 changes: 38 additions & 0 deletions src/main/java/org/example/wiseSaying/WiseSaying.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package org.example.wiseSaying;

public class WiseSaying {
private int id;
private String content;
private String author;

public WiseSaying(int id, String content, String author) {
this.id = id;
this.content = content;
this.author = author;
}

public void setContent(String content) {
this.content = content;
}

public void setId(int id) {
this.id = id;
}

public void setAuthor(String author) {
this.author = author;
}

public int getId() {
return id;
}

public String getContent() {
return content;
}

public String getAuthor() {
return author;
}

}
Loading