/RomanNumerals

A solution for RomanNumerals-Kata

Primary LanguageJavaMIT LicenseMIT

RomanNumerals

A solution for RomanNumerals-Kata

Steps

Step 1

Create githup project, with Cucumber samples and an Application main class

Step 2 - implements digitToNumeral() method

  1. Remove unused files : App*
  2. Create RomanNumerals class with empty digitToNumeral() methods
  3. Create digitToNumeral.feature file
  4. Implements RomanNumerals.digitToNumeral() methods

Step 3 - implements numeralToDigit() tests

Step 4 - implements numeralToDigit() method

  • Prototyping method as long as the tests fail
  • Implements recursive method : ** III = 1 + 1 + 1 = 3 ** IV = 1 + 3 = 4 ** VII = 5 + 1 + 1 = 7 ** IX = 1 + 8 = 9 ** Stop condition is empty string
  • No test for invalid roman numerals like this : IIII