Git Product home page Git Product logo

string-calculator's Introduction

문자열 계산기 구현 및 리팩토링 과정 소개.

자바지기님의 문자열 덧셈 계산기를 구현하고, 리팩토링하는 과정을 학습한다. 영상주소

영상은 총 3개이며, 각 단계별 학습이 가능하다. 위 과정은 TDD로 진행되기 때문에 TDD와 테스팅에 대한 선수지식이 있다면 좋다.

요구사항 정의

문자열 계산기의 요구사항은 전달하는 문자를 구분자로 분리한 후 각 숫자의 합을 구해 반환해야 한다.

  • Step 1 : 쉼표(,) 또는 콜론(:)을 구분자로 가지는 문자열을 전달하는 경우 구분자를 기준으로 분리한 각 숫자의 합을 반환한다.
    • 예: "" => 0, "1,2" => 3, "1,2,3," => 6, "1,2:3" => 6
  • Step 2 : 앞의 기본 구분자(쉼표, 콜론) 외에 커스텀 구분자를 지정할 수 있다. 커스텀 구분자는 문자열 앞부분의 "//"와 "\n" 사이에 위치하는 문자를 커스텀 구분자로 사용한다. 예를 들어 "//;\n1;2;3"과 같이 값을 입력할 경우 커스텀 구분자는 세미콜론(;)이며, 결과 값은 6이 반환되어야 한다.
  • Step 3 : 문자열 계산기에 음수를 전달하는 경우 RuntimeException으로 예외 처리해야 한다.

권장사항

각 스텝 별로 브랜치를 나누어 개발하는 것을 권장한다. 하나에 브랜치에 모두해도 상관은 없다.

코드리뷰

이 저장소를 자신의 개인 깃허브로 fork받은 후, IDE에서 clone하고 요구사항을 구현한다. 각 스텝 별 구현이 완료될 때마다 자신의 Remote 저장소에 push 후 슬랙 채널에 공유한다.

string-calculator's People

Contributors

rebwon avatar dhkim1993 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.