Code Monkey home page Code Monkey logo

devcourse-calculator's Introduction

🔢 미션: 문자열 계산기

🔧 구현 기능

출력

  • 선택 옵션(계산, 조회, 종료) 출력
  • 식 연산 결과 출력

입력

  • 선택 옵션(계산, 조회, 종료) 입력
    • 사용자 입력을 구분(1, 2, 0 과 그 외)
  • 사용자로부터 식을 입력받는 기능

계산기

  • 연산 우선 순위 설정
  • 입력된 식을 후위식으로 변경
  • 후위식 계산

조회

  • 연산 결과 저장
  • 연산 결과 조회

예외처리

  • 정규식을 이용한 예외처리
  • 피연산자의 개수가 연산자 개수보다 많거나 같은 경우 예외처리
  • 빈 값 입력에 대한 예외처리

UML & flow chart

UML - 설계

img_1.png

UML - 구현

img.png

flowchart

img.png

피드백

실행결과(콘솔)

1. 조회
2. 계산

선택 : 2

1 + 2
3

1. 조회
2. 계산

선택 : 2

1 + 2 * 3
7

1. 조회
2. 계산

선택 : 1

1 + 2 = 3
1 + 2 * 3 = 7

선택 : 2

3 - 2 * 2
-1

요구사항

  • 객체지향적인 코드로 계산기 구현하기
    • 더하기
    • 빼기
    • 곱하기
    • 나누기
    • 우선순위(사칙연산)
  • 테스트 코드 구현하기
  • 계산 이력을 맵으로 데이터 저장기능 만들기
  • 정규식 사용

devcourse-calculator's People

Contributors

haero77 avatar learn-programmers avatar ksy90101 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.