Welcome to the RomanNumeral Converter project! This Java application translates Roman numerals to their integer value counterparts with ease and precision. Utilizing a simple and effective mapping system, the converter supports standard Roman numeral conventions including subtractive notation.
This project includes a robust Java class RomanNumeral
that encapsulates the logic for converting Roman numerals to integers. Accompanying this class is a comprehensive suite of JUnit tests RomanNumeralTest
ensuring the correctness of the conversion under various scenarios including single digit conversions, subtractive notations, and complex Roman numeral strings.
To get a copy of this project up and running on your local machine for development and testing purposes, follow these simple steps.
Ensure you have the following installed:
- Java Development Kit (JDK) 1.8 or later
- Maven 3.6 or later
- Clone the repository to your local machine:
git clone https://github.com/yourusername/roman-to-integer-converter.git
- Navigate to the project directory:
cd roman-to-integer-converter
After installing, you can use the RomanNumeral Converter in your Java programs like so:
RomanNumeral romanNumeral = new RomanNumeral();
int result = romanNumeral.romanToInt("MCMXCIV");
System.out.println("The Roman numeral MCMXCIV equals " + result);
To execute the unit tests and verify that everything is working as expected:
mvn test