Standard coding and design questions. Some questions about my background. A tedious question was to convert a string representing a roman number to an integer. This question is not hard to solve, but tedious to code.
Sigiloso
Not the complete solution, but it will be something like this: String[] units = {"", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix"}; String[][] tens = { {"10", "x"} }; String roman = "xxxviii"; int dec = 0; for(int i = 0; i < roman.length(); i++) { if(tens[0][1].equalsIgnoreCase(String.valueOf(roman.charAt(i)))) { dec += Integer.parseInt(tens[0][0]); } else { for(int j = 0; j < units.length; j++) { if(units[j].equalsIgnoreCase(String.valueOf(roman.charAt(i)))) { dec += j; } } } } System.out.println(dec);