Git Product home page Git Product logo

calculator's People

Contributors

stephendiosdev avatar

Watchers

 avatar  avatar

calculator's Issues

Change how operators work in display

Currently when you push an operator (+-*/=) it adds that character to the display. However with the new 8 character limit, these operators should not take up space since it could be used for a digit instead. What we should be doing is how IOS handles their calculator operators:

  • Enter the number you want to start with
  • Push the operator, the button colour changes and the display still shows the original number (don't do this for =)
  • Start entering the second number, the display clears the first number and now only displays the second number
  • When pushing a new operator or equals, the display shows the computed number

Do all "Extra Credit" options

These include:

  • Working floating point math and decimal button
  • Make operator buttons a different colour (this ties into issue #7)
  • Add a backspace button to erase input
  • Add keyboard support

Enforce only 1 decimal per string

Right now we can click the decimal button and have as many decimals in the number as we want. What we actually want is only 1 decimal max, and if we click the decimal it should append a zero right before it.

Main functionality is mostly untested

Create more simple tests (either console log based like currently, or with some kind of testing framework) to test the main functionality of the calculator.

Change how operators are shown on the calculator

Right now the idea is when 2 nums are entered and another operator is pushed, the result is calculated and shown before the new operator gets displayed like so:

  • 8+3 (only 2 nums and 1 op)
  • 8+3+ (2nd op is entered, we now do the result of 8+3
  • 11+ (result is autofilled and the 2nd op is added back)

However I want it to work how the MacOS calculator works where the current operator is highlighted and only numbers and decimals appear on the screen (this looks much cleaner)

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.