Giter Club home page Giter Club logo

java-baseball's Introduction

미션 - 숫자 야구

클래스 다이어그램

클래스 간 Association, Dependency 관계를 표현한 그림은 아래와 같다.

클래스 다이어그램

구현 기능 목록

  • Application 클래스: 재시작 입력값에 따라 무한히 runGame 메서드 호출

  • FlowHandler 클래스:

    • int runGame() 메서드: 입출력 및 점수계산 등의 게임 흐름 관리
  • Score 클래스: 볼, 스트라이크 횟수를 보관하는 DTO

  • BaseballNumGenerator 클래스:

    • List getBaseballNumber() 메서드: 세 개의 난수가 담긴 리스트 반환
  • Grader 클래스:

    • Score getScore(List) 메서드
    • boolean isCorrect(List) 메서드
  • OutputHandler 클래스:

    • void printInitMessage() 메서드
    • void printInputMessage() 메서드
    • void printScore(Score) 메서드
      • String buildNonZeroScoreString(int, int) 메서드: '낫싱'이 아닐 경우에 점수를 문자열로 생성
    • void printGameEndMessage() 메서드
  • InputHandler 클래스:

    • List getInputList() 메서드: 콘솔 입력값을 validation도 진행
    • int getRestartInt() 메서드: validation도 진행
  • InputValidator 클래스: IllegalArgumentException 상황들 처리

    • boolean validateAnsString(String) 메서드
      • 길이가 3이 아닌 입력 검증
      • 숫자가 아닌 입력 검증
      • 동일한 숫자가 포함되었는지 검증
      • 맨 앞자리가 0이 아닌지 검증
    • boolean validateRestartString(String) 메서드
      • 입력이 문자열 1또는 2인지 검증

java-baseball's People

Contributors

jaehee329 avatar woowabrie 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.