The Math Operations App is a simple command-line application designed to perform basic mathematical operations such as addition, subtraction, multiplication, and division. It enables users to provide inputs directly from the command line, making calculations fast and straightforward.
This repository contains the source code and configurations for the Math Operations App, a Java-based application built using Gradle. The app features structured logging, unit testing, and a well-defined architecture to simplify its use and maintenance.
The application takes three arguments:
- A number.
- An operator (
+
,-
,*
, or/
). - Another number.
It then performs the requested operation and displays the result. The app also includes robust error handling for invalid inputs or operations, with detailed logs and error messages.
This repository is suitable for:
- Developers learning Java and Gradle.
- Students or individuals looking for a basic yet functional calculator example.
- Engineers needing a template for building and debugging small Java-based CLI tools.
git clone https://github.com/MathieuSrour/MathOperationsApp.git
cd MathOperationsApp
To build the application:
gradle clean clean shadowjar
To execute the program:
java -jar build/libs/App-1.0.0.jar <number1> <operation> <number2>
Example:
java -jar build/libs/App-1.0.0.jar 10 + 5
To run the tests and verify functionality:
gradle test
You can contribute to this project by:
- Reporting issues via GitHub's "Issues" tab.
- Suggesting features or improvements.
- Submitting pull requests with bug fixes, enhanced functionality, or documentation updates.
- Writing additional test cases to improve test coverage.
This project is licensed under the MIT License. See the LICENSE file for more details.
- Email: [email protected]
- GitHub Repository: Math Operations App
- For questions or issues, please open a ticket in the GitHub Issues tab.