Results 1 to 3 of 3
  1. #1
    maria is offline Member
    Join Date
    Mar 2013
    Posts
    3
    Rep Power
    0

    Default 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!!!
    Last edited by Fubarable; 04-02-2013 at 07:55 PM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Sorting roman numerals

    Removed from Convert roman numerals

    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 Guide For New Members and BB Code List - Java Programming Forum - Learn Java Programming and edit your post accordingly.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    maria is offline Member
    Join Date
    Mar 2013
    Posts
    3
    Rep Power
    0

    Default 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!!!

Similar Threads

  1. Convert the number to Roman numerals
    By ŖΫ ỏ Ңόρę in forum New To Java
    Replies: 9
    Last Post: 11-29-2012, 10:44 PM
  2. Roman Numerals help
    By umaza in forum New To Java
    Replies: 2
    Last Post: 05-22-2012, 01:02 AM
  3. Convert roman numerals
    By matzahboy in forum New To Java
    Replies: 4
    Last Post: 02-21-2010, 10:06 PM
  4. convert from roman numerals to integers and vice versa
    By number1cynic in forum New To Java
    Replies: 10
    Last Post: 01-18-2010, 11:54 PM
  5. Convert roman numerals to integers
    By Felissa in forum Advanced Java
    Replies: 2
    Last Post: 07-01-2007, 11:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •