Giter Club home page Giter Club logo

rpn-calculator's Introduction

Calculator Application README

Overview

This Calculator Application is a Java-based program designed to perform basic arithmetic operations. It follows the MVC (Model-View-Controller) architecture, ensuring a clean separation of concerns between user interface, business logic, and data handling.

Reverse Polish Notation (RPN) is a method of mathematical expression that differs significantly from the conventional algebraic notation. In standard notation, operators are typically placed between operands, like in the expression 3 + 4. In contrast, RPN places operators after their operands. For the same expression in RPN, it would be written as 3 4 +. This format eliminates the need for parentheses to define the order of operations. In an RPN system, the calculation is performed in the order the elements appear, working from left to right, applying each operator to the operands that immediately precede it. This makes RPN particularly efficient and reduces the cognitive load in complex calculations, as the order of operations is explicit and does not rely on operator precedence rules. RPN is often used in scientific and financial calculators due to its efficiency in handling complex expressions.

Getting Started

To run this game, ensure you have Java and JavaFX installed on your system.

Prerequisites

  • Java JDK 8 or above
  • JavaFX SDK

Running the Game

  1. Clone the repository to your local machine.
  2. Navigate to the project directory.
  3. Compile the Java files: javac -cp path/to/javafx-sdk/lib --add-modules javafx.controls INSERT MODULES.
  4. Run the Main class: java -cp path/to/javafx-sdk/lib --add-modules javafx.controls Main

Note: Modify the paths to compile the Java Files using JavaFX SDK according to the actual location of your JavaFX SDK.

File Structure

The project consists of the following key components:

  1. Main.java

    • The main entry point of the application. It is responsible for initializing and launching the calculator.
  2. CalculatorGUI.java

    • Manages the graphical user interface (GUI) of the calculator. This component presents information to the user and captures user input.
  3. CalculatorModel.java

    • Handles the data and core logic of the calculator, such as performing calculations and storing results.
  4. CalculatorControler.java

    • Contains the logic for controlling calculator operations. This component acts as an intermediary between the Model and GUI.

In addition to these, there are corresponding interface files (CalculatorControlerInterface.java, CalculatorModelInterface.java, CalculatorGUIInterface.java) that define essential methods for each component. Also, an application.css file is included for styling the GUI.

Usage

To run the application:

  1. Ensure you have Java installed on your system.
  2. Compile the Java files.
  3. Run Main.java.

Interface

RPN Calculator Interface

Contributions

This project is open for contributions. Please adhere to standard coding practices when making changes or additions. For questions or feedback, please contact me at [email protected]!

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

rpn-calculator's People

Contributors

loshanrsn avatar arthur-ru avatar

Watchers

 avatar

Forkers

1hackercenter

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.