|
-
Mar 13th, 2007, 02:09 PM
#1
Thread Starter
New Member
A program that asks for two strings and reports their lexicographical ordering
I need some help with this program. Can somebody tell what I need to did in order to get my program started. Thanks
A program that asks for two strings and reports their lexicographical ordering, i.e. as they would appear in a lexicon that sorts them according to ASCII values. Do not use any predefined string comparison methods! The only predefined methods you may use are nextLine() of the Scanner class and length() and charAt(int i) of the String class.
EXTRA CREDIT: allow the user to decide whether they want to ignore case in the comparison (again without using predefined methods). Make sure you get the program working first without this feature.
Examples not ignoring case:
"abc" == "abc", "ABC" < "abc", "fishery" > "fish", "run?" > "run!"...
Examples ignoring case:
"abc$" == "ABC$", "Hat" == "haT", "cat" < "Hat", "Hatter" > "hat", ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|