Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sorting Names

 
Donald R. Cossitt
buckaroo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The SortNames assignment requires output of a list of names sorted by first name then an output sorted by last name from same text file names list.
I have a very rough draft that gives the out put following:
Abraham Lincoln
Adam Baum
Bill Joy
Connie Chung
James Gosling
Joe Montana
Justin Case
Walter Cronkite
Baum, Adam
Case, Justin
Chung, Connie
Cronkite, Walter
Gosling, James
Joy, Bill
Lincoln, Abraham
Montana, Joe

This is how one would normally see a list of names sorted by last name. However, I suspicion this MAY not be what is desired by the instructor. My question is: is it?
Thanks
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I remember correctly, I believe commas fall into the "advanced assignments" category.
Oh! Or do you mean: do the names have to be printed "lastname firstname". Nope, I don't think I did that, but they definitely were sorted on lastname.
All so hazy and faded...
[ May 06, 2003: Message edited by: Barry Gaunt ]
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The output should look like:

Abraham Lincoln
Adam Baum
Bill Joy
Connie Chung
James Gosling
Joe Montana
Justin Case
Walter Cronkite

Adam Baum
Justin Case
Connie Chung
Walter Cronkite
James Gosling
Bill Joy
Abraham Lincoln
Joe Montana
 
Donald R. Cossitt
buckaroo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just as I was afraid it would be
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic