/kotlin-calculator

A desktop-based calculator application that created with Kotlin, GUI with TornadoFX, and package manager with Gradle.

Primary LanguageKotlin

Simple Calc

Description


Simple calculator that have some basic function and made with Java and Kotlin as Language, JavaFX and TornadoFX as GUI Framework, and also Gradle App Builder.

Feature


  1. Basic Operation (+, - , x, /)
  2. Sqrt and power operation (sqrt, ^)
  3. Logarithm function (log)
  4. Trigonometric function (sin, cos, tan)
  5. Memory functionality (MR, MC, Ans)
  6. Deleting functionality (<-, CE, AC)

Requirements


To run this project, you must have at least:

  1. JDK, here I use JDK 14, but it should be safe as long you use JDK version newer than 11.
  2. Kotlin, I used version 1.3.70
  3. IntelliJ IDEA 2019 as IDE, I've used another IDE as VSC, but it fail.
  4. Gradle, use version 6.2.2, as I use this version.

How to Prepare the App


  1. Run IntelliJ IDEA, then open the project

  2. Wait for a while, it should installing some dependencies, as JavaFX and TornadoFX, it might be installing gradle, too.

  3. After finish installing dependencies, on IntelliJ embedded terminal, try execute

     gradle clean build
    

    after finish building, then execute

     gradle run
    

    to run the program

  4. Wait, and the calculator screen should've appeared

How to use the App


This calculator is so simple

  1. Press the button to make equation you want to solve
  2. Press = to calculate
  3. To use memory feature you can press MC button to save the value, and MR button to use it. Remember this is using Queue DS.
  4. If you make mistake, you always can press <- button to delete the last char you typed, or press AC one to return teh calculator to it's initial state as it's first condition

Notes


Feature

  1. This is actually support input by keyboard, but still beta-testing, so not recommended as some key might leading to crash
  2. This only support a operation at once, one unary operator or one binary operator

Bugs

  1. Not a pure bug, but after calculating result, we must clear the screen that contain result/answer with CE button manually, if not the screen look will be joined with previous result and would trigger further error.

Credits


  1. Naufal Prima Yoriko - Github : primayoriko
  2. Lionarta Savirandy - Github : Lionnarta
  3. Michelle Theresia - Github : michellethr