Numerical Converter

This project provides a Numerical Converter that can convert integers to Roman numerals and vice versa.

Prerequisites

Before running the project, make sure you have the following installed on your machine:

  • Java (JDK)
  • Maven

Build and Run

  1. Clone the repository:

    git clone https://github.com/your-username/numerical-converter.git
    
  2. Navigate to the project directory:

  cd numerical-converter
  1. Build the project using Maven:
  mvn clean package
  1. Run the Numerical Converter:
java -jar target/numerical-converter-1.0-SNAPSHOT.jar

Replace 1.0-SNAPSHOT with the actual version generated by Maven.

Usage

The Numerical Converter supports two main operations:

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

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

Run Tests

To run the tests, execute the following Maven command:

mvn test

This will run the JUnit tests and display the results in the terminal.

Examples

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

License

This project is licensed under the MIT License - see the LICENSE file for details.