import java.util.TreeMap; class IntToRoman { public final static String toRoman(int number, TreeMap romanIdentifiers) { int l = romanIdentifiers.floorKey(number); if (number == l) { return romanIdentifiers.get(number); } return romanIdentifiers.get(l) + toRoman(number – l, romanIdentifiers); } public static void main(String[] args) { final TreeMap romanIdentifiers = new TreeMap(); romanIdentifiers.put(1000, “M”); romanIdentifiers.put(900, “CM”); romanIdentifiers.put(500, “D”); romanIdentifiers.put(400, “CD”); romanIdentifiers.put(100, … Read more