Skip to content

[4기 - 김영훈] 1~2주차 과제: 계산기 구현 미션 제출합니다. #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 35 commits into
base: b2sic
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
aa3cbc6
init: 프로젝트 초기 세팅
B2SIC Jun 7, 2023
7e4578f
chore: .gitignore에 gradle 관련 내용 추가 및 불필요한 파일 제거
B2SIC Jun 7, 2023
6368d93
chore: .gitignore에 .idea 추가 및 불필요한 파일 제거
B2SIC Jun 7, 2023
a37c6cd
chore: 빌드 관련 파일 추가
B2SIC Jun 8, 2023
18c4dbc
feat: 메뉴 선택 기능 및 관련 메세지 정의 추가
B2SIC Jun 8, 2023
339bac9
feat: 연산자, 피연산자, 괄호 판별을 위한 Validator 추가
B2SIC Jun 9, 2023
2dcd810
feat: 후위표기식 변환 및 계산 기능 추가
B2SIC Jun 9, 2023
b0839b6
refactor: 실행 메인부 클래스명 변경
B2SIC Jun 9, 2023
39ff8c7
refactor: 실행 메인부 클래스명 재변경
B2SIC Jun 11, 2023
9cb8ce8
feat: 메뉴 선택 관련 입출력 기능 및 메시지 정의 추가
B2SIC Jun 11, 2023
6cbe184
refactor: 메시지 관련 클래스명 변경에 따른 기존 파일 삭제
B2SIC Jun 11, 2023
616e910
feat: 계산 이력 저장 기능 추가
B2SIC Jun 11, 2023
a119b9e
refactor: Converter 인터페이스 및 계산 기능 분리
B2SIC Jun 11, 2023
03389be
chore: 테스트를 위한 AssertJ 의존성 추가
B2SIC Jun 11, 2023
45abcdc
feat: Validator 기능 추가
B2SIC Jun 11, 2023
dd6f3bc
test: Validator 메소드 테스트
B2SIC Jun 11, 2023
5305130
test: 계산 관련 테스트
B2SIC Jun 11, 2023
2a7acd7
test: 저장소 테스트
B2SIC Jun 11, 2023
88049e0
docs: README.md 체크 리스트 수정
B2SIC Jun 11, 2023
54792dd
chore: 테스트 관련 의존성(JUnit5) 추가
B2SIC Jun 15, 2023
f3c524e
refactor: Application명 변경
B2SIC Jun 15, 2023
2cc308c
refactor: 패키지명 변경 및 static 메소드 분리, 메소드 타입 변경
B2SIC Jun 15, 2023
6fbb043
refactor: 패키지명, 클래스명 변경 및 연산식 분리, 의존성 외부 주입
B2SIC Jun 15, 2023
aae2a9e
refactor: 패키지명 변경 및 표현식 저장 타입 변경
B2SIC Jun 15, 2023
5edf79d
refactor: 연산 동작 분리를 위한 Enum 클래스 추가
B2SIC Jun 15, 2023
2464e92
refactor: 메뉴 메시지 역할 분리
B2SIC Jun 15, 2023
4e58371
refactor: Custom Exception으로 ZeroDivisionException 클래스 추가
B2SIC Jun 15, 2023
4167cfc
refactor: 클래스명 변경 및 저장소 타입 변경, 결과값 저장 기능 추가
B2SIC Jun 15, 2023
9e06b24
refactor: 클래스명 변경 및 메뉴 기능별 분리
B2SIC Jun 15, 2023
3037564
refactor: 기존 interface 메소드 -> StringUtil 클래스로 이동
B2SIC Jun 15, 2023
4f30930
fix: 두자리수 이상의 연산식을 검증 못하는 버그 수정
B2SIC Jun 15, 2023
5b23467
refactor: 클래스명 변경에 따른 테스트 클래스명 변경
B2SIC Jun 15, 2023
5dcd2aa
refactor: @ParameterizedTest 반영 및 올바른 식 검증
B2SIC Jun 15, 2023
99f6ce7
refactor: 결과 값 저장 추가에 따른 테스트 메소드 변경
B2SIC Jun 15, 2023
ac8794f
refactor: 메뉴 번호를 Enum 클래스로 관리
B2SIC Jun 17, 2023
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
171 changes: 171 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# Created by https://www.toptal.com/developers/gitignore/api/java,intellij,gradle
# Edit at https://www.toptal.com/developers/gitignore?templates=java,intellij,gradle

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
.idea

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### Gradle ###
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

### Gradle Patch ###
# Java heap dump
*.hprof

# End of https://www.toptal.com/developers/gitignore/api/java,intellij,gradle
37 changes: 11 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,22 @@
# java_calculator
자바 계산기 구현 미션 Repository입니다.

### 이곳은 공개 Repo입니다.
1. 여러분의 포트폴리오로 사용하셔도 됩니다.
2. 때문에 이 repo를 fork한 뒤
3. 여러분의 개인 Repo에 작업하며
4. 이 Repo에 PR을 보내어 멘토의 코드 리뷰와 피드백을 받으세요.

### Branch 명명 규칙 + 팀의 PR규칙 정하기
1. 여러분 repo는 알아서 해주시고 😀(본인 레포니 main으로 하셔두 되져)
2. prgrms-be-devcourse/spring-board 레포로 PR시 branch는 gituser_id을 적어주세요 :)
- base repo : `여기repo` base : `username` ← head repo : `여러분repo` compare : `main`또는 `github_id`
3. 실제 진행할 PR규칙은 멘토+팀원들과 정하여 진행해주세요 :)
- ← head repo : `여러분repo` compare : `main`로 할지
- 또는 ← head repo : `여러분repo` compare : `github_id`로 할지
- 참고 : [Github 위치 및 피드백 기준 가이드](https://www.notion.so/backend-devcourse/Github-e1a0908a6bbf4aeaa5a62981499bb215)
자바 계산기 구현 미션 Repository 입니다.

### 과제를 통해 기대하는 역량

- 깃허브를 통한 코드리뷰를 경험해보자
- 기본적인 테스트 코드 작성 및 활용하는 능력해보자
- 스스로 OOP를 생각하고 코드로 옮길 수 있는 능력해보자
- 깃허브를 통한 코드리뷰를 경험
- 기본적인 테스트 코드 작성 및 활용하는 능력
- 스스로 OOP를 생각하고 코드로 옮길 수 있는 능력

### 요구사항
- 콘솔로 구현입니다.(스윙으로 구현하시는 분들 계실까봐)
- 객체지향적인 코드로 계산기 구현하기
- [ ] 더하기
- [ ] 빼기
- [ ] 곱하기
- [ ] 나누기
- [ ] 우선순위(사칙연산)
- [ ] 테스트 코드 구현하기
- [ ] 계산 이력을 맵으로 데이터 저장기능 만들기
- [x] 더하기
- [x] 빼기
- [x] 곱하기
- [x] 나누기
- [x] 우선순위(사칙연산)
- [x] 테스트 코드 구현하기
- [x] 계산 이력을 맵으로 데이터 저장기능 만들기
- 애플리케이션이 동작하는 동안 데이터베이스 외에 데이터를 저장할 수 있는 방법을 고안해보세요.
- (선택) 정규식 사용

Expand Down
21 changes: 21 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins {
id 'java'
}

group 'com.programmers.devcourse'
version '1.0-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testImplementation 'org.assertj:assertj-core:3.24.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.2'
}

test {
useJUnitPlatform()
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading