Giter VIP home page Giter VIP logo

java-racingcar-kakao's Introduction

java-racingcar-kakao

문자열 덧셈 계산기

  1. 유저의 입력 받아오기

  2. 문자열에서 추가 구문자 추출

  3. target string 에서 구분자들 기준으로 split

  4. split 된 substring의 유효성 검증

    • NULL or 빈문자열일 경우 0 반환
    • 음수일 경우 Runtime Exception을 throw
    • Integer가 아닐 경우 Exception을 throw
  5. 변환된 substring 들을 더하여 반환

Test의 target

Class

  • calculator.StringParser
    • parseSplitter
    • parseTargetString
    • splitTargetString
    • castStringToInteger
  • calculator.StringVerifier
    • isInteger
    • isPositive
    • isNullOrEmpty
  • calculator.Calculator
    • add()
  • Runner
    • public run()
    • private receiveInput
    • private calculate
    • private printResult

CarRacing

Domain

Interface

  • interface RacingPlayer
    • property
      • String name
      • int position
    • method
      • proceedNextTurn
      • getScore
      • getName
  • interface GamePlayStrategy
    • generateScore

Class

  • class Car implements RacingPlayer
    • @override toString
  • GameRule
    • static property
      • STANDARD_SCORE
      • GAME_PLAY_STRATEGY
    • static method
      • isAbleToProceed
      • getWinners
  • RandomPlayStrategy implements GamePlayStrategy

View

  • OutputView
    • method
      • askForNames
      • askForNumberOfTurns
      • printCurrentStatus
      • printWinners
      • getConcatenatedNameFromArray
  • InputView
    • method
      • getPlayerNames
      • getNumberOfTurns
      • verifyName

Controller

  • class RacingController
    • property
      • inputView
      • racingPlayers
      • playerNames
      • numberOfTurns
    • method
      • run
      • getNamesFromUser
      • getNumberOfTurnsFromUser
      • printResult
      • createPlayers
      • runSingleTurn
      • sleep

java-racingcar-kakao's People

Contributors

baeronui avatar wotjd243 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.