So I've taken a peek at SortNames while waiting for OOP2 to come back from nitpicking, and...
I've made a solution that works, but I must say that initially it was very confusing. Perhaps it's because I've been on an extended break. I found the first part of the assignment to be pretty straightforward.
But wow, the second part threw me for a loop for a bit.
I found this link pretty helpful, but I still have some questions.
In the assignment, it states Use the Collections class for sorting so I think it's safe to say here that Collections.sort(somethingToBeSorted) is where we should go? Now, looking at the API, anything to be sorted must implement a certain interface.
However, it's the argument after the "somethingToBeSorted" that's doing the real work on the second go round, but in order to do this....
I'm really really hoping that the somethingToBeSorted doesn't have to be an exact representation of the things in the file to be read in? Is it ok to give those things certain attributes, and then stuff them into somethingToBeSorted?
Or am I way way off track?
If this made no sense at all, I apologize, and I'll try to reword it. Trying to be vague enough not to give anything away without being too vague.
Edited out a previous assumption that in experimenting I found to be completely wrong. That assumption was the inherited method from needed interface was not needed. Turns out, it really isn't needed, but if you use it the way it's meant to be, you don't have to use two different workhorses, and save yourself some time typing. Ah, the joys of learning. [ May 16, 2008: Message edited by: Nathan Leniz ]
The very existence of flamethrowers proves that at some time, some where, some place, someone once said to themselves "I'd really like to set those people on fire over there, but I just can't get close enough".