Skip to content

Your already familiar iPhone calculator right on the Web!. Get the iconic look and feel of your day to day built in pocket calculator of iOS. But now with the enhanced calculation history feature.

License

Notifications You must be signed in to change notification settings

sangbk208/calculator-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

My ReactJS Pocket Calculator

Your already familiar iPhone calculator right on the Web!


View Demo · Report Bug · Request Feature


Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact


About The Project

Get the iconic look and feel of your day to day built in pocket calculator of iOS. But now with the enhanced calculation history feature.

Screenshot 2023-03-22 at 11 02 03

Built With

React

Features

  1. Basic calculation with addition, subtraction, multiplication and division operations

image

  • Usage tips:
    • We support single operation as well as chain of operations.
    • To calculate a chain of operations, simply input the next operators after getting the result of the previous operation on the result screen.
    • The result of the previous operation will be used as the first operand in the next operation
    • The result of the operation is calculated at the time the next operator or the equal operator is selected
      • As a result, operators precedence is not supported in this version of the application (that could be supported if we implement parenthesis operators)
  1. Toggle between negative and positive numbers

image

  • Usage tips:
    • Use this key to toggle between positive and negative number after entering any operands
    • If you toggle this key before inputting the second operand (which means just after entering the operator), it will apply the logic to the first operand and use it as the second operand for the operation.
  1. Calulation with decimal numbers

image

  • Usage tips:
    • Use this key before entering the decimal part of a operand
    • We provide a shortcut that if you don't enter the whole part first, the whole part will be assumed to be the zero number.
    • We round the result of all operations with decimal numbers upto 8 numbers after the decimal point.
  1. Clear the most recent entry

image

* Usage tips: * Using this feature don't affect the existing calculation history. * You could use this key to clear the most recent input entry (which could be either operand or operator) * We only support clearing the most recent entry, which means after selecting this key, it will be changed from C to AC, that only allows you to reset the current calculation.
  1. Clear all entries

image

  • Usage tips:
    • Using this feature don't affect the existing calculation history.
    • This key will appear after using the Clear the most recent entry feature
    • Selecting the key multiple times does't change its behaviour.
  1. Toggle showing calculation history

image

  • Usage tips:
    • Use this key to toggle showing all the calculation history.

Getting Started

Prerequisites

  1. npm
npm install npm@latest -g

Installation

  1. Clone the repo

    git clone https://github.com/sangbk208/calculator-app.git
  2. Install NPM packages

    npm install

Usage

  1. Run all unit tests

    npm test
  2. Run the application locally

    npm start

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Sang Nguyen- @sbk208 - [email protected]

Project Link: https://github.com/sangbk208/calculator-app

About

Your already familiar iPhone calculator right on the Web!. Get the iconic look and feel of your day to day built in pocket calculator of iOS. But now with the enhanced calculation history feature.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published