Write a recursive method that takes a String consisting of a
properly encoded Roman numeral and returns its value as
an int.
The digits in Roman numerals are I, V, X, L, C, D, and M which stand for 1, 5, 10, 50, 100, 500, and 1000. Numbers are written with bigger values first, so 12 is "XII".
The only wrinkle is that some numbers are written in “subtractive form” where a smaller valued digit is written first indicating its value should be subtracted from the value of the next digit. For instance, "IV" for 4, "IX" for 9, and "CM" for 900.
The Wikipedia article on Roman numerals has a good table of the rules.
You can use the provided method fromRomandigit to translate a
one-letter string containing a single Roman digit into
its int value.
BONUS PROBLEM: Write a recursive method that takes
an int and returns a properly encoded Roman numeral as
a String.