Git Product home page Git Product logo

ijae_but_brno's Introduction

IJAe 2017/18 Project

December, 2017

Assignment

Creating a calculator application that provides both basic and more complex mathematical operations and supports number representation in different bases (decimal, binary, etc.). For this task, I use a well-known JavaScript library called math.js as calculation engine. Math.js features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types like numbers, big numbers, complex numbers, fractions, units, and matrices.

Graphical user interface specification

  1. Input and Output fields– the application provides the option to input the numeric values from keyboard. It also displays a list of the expressions along with their results. One click in one expression will write in input field.
  2. C, CE and DEL buttons– allow to delete the current input, erase the memory and delete the last digit/operator from the user input respectively.
  3. Equals sign button– starts the computation.
  4. Number buttons, parethesis buttons, decimal mark button– allow to input numeric values without using keyboard, include hexadecimal values as well. Keyboard could also be used.
  5. Basic maths operation buttons– include addition, multiplication, subtraction, division and modulo operations.
  6. Numeric base option– allows the user to choose in which numeric base the numbers are represented. Number buttons are enabled / disabled accordingly to the current base selected (e.g. with binary numbers, only 1 and 2 are enabled). Input values also changes when calculation base is changed.
  7. Advanced maths operation buttons– include sinus, cosinus, exponential function, logarithm with the base of 2 and natural logarithm. User can choose whether the advanced operations are displayed or hidden.
  8. Edit menu with options to copy from both fields and paste to the input field.
  9. Help section with credits about the application and an manual of use. This will show the documentation for the math.js library for advance input use.

Functionality specification

  • The calculator has memory storing the result of the last computation.
  • The next computation can use the value in memory as its first operand.
  • The application provides different modes of use depends on the level of the user: a noob mode with basic use; a guided mode with restricted input; and an advance mode with free input, which will help us to take real advantage of calculation engine math.js
  • User is able to provide input expressions from the keyboard. The application checks the format and ensure the correctness of the user input. A warning should be shown in case of incorrect input.
  • Angles can be expressed in degrees or radians.
  • Main class is called CalcDemo.java. Math.js is obtained by internet.

Project can be compiled and executed by the next commands in root project folder:

    $ ant
    $ java -jar dist/xmonte03.jar

Captures

Binary base

Octal base

Decimal base

Hexadecimal base

Calculation example

ijae_but_brno's People

Contributors

gmm96 avatar

Watchers

 avatar  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.