# Sorting roman numerals

Printable View

• 03-09-2013, 10:45 PM
maria
Sorting roman numerals
in general can u explain for me the ruman numeral in java how to write the public static void compareTo (RomanNumeral rn){} can u help me
Thank u !!!!!

Hi can u help me with the sorting ruman numeral , I wrote one but i can't compile it:
public class RomanNumeralSort extends SortAlgorithm {

/**
* @param args
* @return
*/
public void sort (int [] RomanNumeral , int arrayLength ,RomanNumeral[] romanNumeralList)throws Exception {

for ( int i = 0; i < arrayLength.length; i++ ) {
int indexLowest = i;
int j;
boolean swap = false;
/*
* Find the smallest roman numeralin the unsorted list.
* those code will sort the roman numeral.
*/
for ( int j = i + 1; j < arrayLength.length; j++ ){
if(stopRequested){
return;
}

if ( arrayLength[j] < arrayLength[indexLowest] ) {
indexLowest = j;
}
pause (i,j);
}
if ( arrayLength[indexLowest] < arrayLength[i] ) {
swap= true;
int temp = arrayLength[indexLowest];
arrayLength[indexLowest] = arrayLength[i];
arrayLength[i] = temp;
pause (i,j);
} //if statment
} // for loop
}// sort

} // class
can you tell me what I did it wrong ....
Thank You!!!
• 03-10-2013, 06:03 AM
DarrylBurke
Re: Sorting roman numerals
Removed from http://www.java-forums.org/new-java/...-numerals.html

When you have a question,m start your own thread,. Don't post to old dead threads and don't hijack another poster's thread.

Also, go through http://www.java-forums.org/forum-gui...w-members.html and BB Code List - Java Programming Forum - Learn Java Programming and edit your post accordingly.

db
• 03-10-2013, 10:12 PM
maria
Re: Sorting roman numerals
https://bbhosted.cuny.edu/bbcswebdav...ct1%281%29.pdf

This the website for this project I need help with the compareTo method....

Thank You!!!