convert from roman numerals to integers and vice versa

Hi! I have a question. I have to write a class that takes roman numerals and returns their integer value and vice versa. Any and all help would be greatly appreciated.

Here is what I have so far:

public class RomanNumerals

{

//Return the integer value of a roman numeral digit

private static int digitValue(char digit)

{

switch ( digit )

{

case 'I' : return 1;

case 'V' : return 5;

case 'X' : return 10;

case 'L' : return 50;

case 'C' : return 100;

case 'D' : return 500;

case 'M' : return 1000;

default : throw new RuntimeException("Not a valid Roman Numeral");

}

}

//Read a Roman Numeral string and return the integer value

public static int decimalValue(String roman)

{

int value = 0;

return value;

}

//Read a positive integer and return a string with its value in Roman numerals

public static String romanValue(int decimal)

{

String roman = "";

int N = number;

while (N >= 1000) {

// Move 1000 from N to roman.

roman += "M";

N -= 1000;

}

while (N >= 900) {

// Move 900 from N to roman.

roman += "CM";

N -= 900;

}

//etc

}