Read the documentation and Google for tutorials about Java's enum (this entered the language with version 1.5). Then you'll know what I mean by:
enum English {one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen, twenty; }
The natural ordering for this enum is the same as the order in which I specify the entries. Namely one comes before two comes before three, and so on. I can create an array of these enums:
English[] foo = new English[args.length];and create a Sort for them via:
Sort < English > s = new Sort < English > (foo);
Now all you have to do is figure out how to convert commandline arguments into English objects, and your code will run like mine:
java SortEnglish one three five four two one two three four five
In the following exercise you are asked, in parts, to "discuss ideas" for a program. You can do exactly that. Or, if you prefer, you can write a program to accomplish the described task.
java SortRoman III I IV XII XLII VI CI I III IV VI XII XLII CI
I II III IV V VI VII VIII IX X XI XII XIII XIV XV XVI XVII XVIII XIX XX XXI XXII XXIII XXIV XXV XXVI XXVII XXVIII XXIX XXX XXXI XXXII XXXIII XXXIV XXXV XXXVI XXXVII XXXVIII XXXIX XL XLI XLII XLIII XLIV XLV XLVI XLVII XLVIII IL L