Giter Club home page Giter Club logo

java-car-racing-game's Introduction

Velog's GitHub stats

Velog's GitHub stats

Anurag's GitHub stats

java-car-racing-game's People

Contributors

banjjoknim avatar

Watchers

 avatar

java-car-racing-game's Issues

현재 ``isCorrectName()`` 기능은 올바른 자동차 이름인지를 판별하는 역할을 합니다. 지금 현재 로직으로는 아래의 ``setCars()`` 기능에서 이 ``자동차 이름 판별`` 기능을 이용하고 있습니다.

현재 isCorrectName() 기능은 올바른 자동차 이름인지를 판별하는 역할을 합니다. 지금 현재 로직으로는 아래의 setCars() 기능에서 이 자동차 이름 판별 기능을 이용하고 있습니다.

하지만 Car 객체가 생성되는 시점에서 이를 판단하여 예외처리 한다면, 자동차 이름을 판별하는 기능을 따로 신경쓰지 않아도 될 것입니다. 또한 객체의 예외처리가 생성되는 시점에서 진행되기 때문에, 잘못된 입력이 들어왔을 경우 불필요한 객체 생성을 방지할 수 있습니다. 또한 이런 구조로 일관적으로 예외 처리를 한다면, 예외처리를 어디서 어떻게 진행해야하는지 더 명확해질 것이고 그 위치또한 판단하기 쉬워질 것입니다.

지금까지는 따로 예외 상황에 예외를 던지고 그에 대한 대처를 하는 로직 없이 while()문을 통해 올바른 값이 들어오고 나올 때 까지 입,출력을 반복하는 방법으로 코드를 짰습니다. 다음 PR때는 이 구조를 예외처리 구조(try - catch) 로 변경해보셨으면 좋겠습니다.

Originally posted by @Rok93 in #2 (comment)

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.