This project provides a Numerical Converter that can convert integers to Roman numerals and vice versa.
Before running the project, make sure you have the following installed on your machine:
- Java (JDK)
- Maven
-
Clone the repository:
git clone https://github.com/your-username/numerical-converter.git
-
Navigate to the project directory:
cd numerical-converter
- Build the project using Maven:
mvn clean package
- Run the Numerical Converter:
java -jar target/numerical-converter-1.0-SNAPSHOT.jar
Replace 1.0-SNAPSHOT with the actual version generated by Maven.
The Numerical Converter supports two main operations:
- Convert Integer to Roman Numeral To convert an integer to a Roman numeral, use the following command:
java -jar target/numerical-converter-1.0-SNAPSHOT.jar convert-to-roman <integer>
Replace with the integer you want to convert.
- Convert Roman Numeral to Integer To convert a Roman numeral to an integer, use the following command:
java -jar target/numerical-converter-1.0-SNAPSHOT.jar convert-to-integer <romanNumeral>
Replace with the Roman numeral you want to convert.
To run the tests, execute the following Maven command:
mvn test
This will run the JUnit tests and display the results in the terminal.
Example 1: Convert Integer to Roman Numeral
java -jar target/numerical-converter-1.0-SNAPSHOT.jar convert-to-roman 1234
Output: MCCXXXIV
Example 2: Convert Roman Numeral to Integer
java -jar target/numerical-converter-1.0-SNAPSHOT.jar convert-to-integer XVII
Output: 17
This project is licensed under the MIT License - see the LICENSE file for details.