For an assignment we're given these two arrays:
private final static int[] NUMBERS= {1000,900,500,400,100,90,50,40,10,9,5,4,1};
private final static String[] LETTERS = {"M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"};
The objective is to create a method that will give the user a conversion for the numeric expression they give and turn it into roman numerals.
I am just wondering how you can make the two array's index points match up so that they have the same indexOf so I can create the method that returns the corresponding numeral.
I know that:
the arrays match up with each other in their values
But I don't know:
how to express combining the two arrays to get one return which is the roman numeral. I would also be grateful if I could see other examples for learning string arrays.