Advertisement
INSECURE-FLOWERPOT

People-Place pseudocode

Feb 22nd, 2015
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. "People or Place?"
  2.  
  3. if(choice=people)
  4. {
  5. "sort or search?"
  6.  
  7. if(choice=sort)
  8. {
  9. "first or last?"
  10.  
  11. if(choice=first)
  12. {
  13. display list of information on all people
  14. from database, sort by first, last, name(s)&mi.
  15. }
  16. else
  17. {
  18. display list of information on all people from data
  19. base, sorted by last name, first name, mi.
  20. }
  21. }
  22. else
  23. {
  24. "exact or partial?"
  25.  
  26. if(choice=exact)
  27. {
  28. prompt for exact name
  29.  
  30. search database for matching name
  31.  
  32. display person's information to user
  33. }
  34. else
  35. {
  36. prompt for partial name
  37.  
  38. search database for names that include input anywhere within the name
  39.  
  40. display information on all of matching people to user.
  41. }
  42. }//end of "people choice"
  43.  
  44. /**Beginning of "place" dialogue*//
  45.  
  46. else
  47. {
  48.  
  49. "state or city?"
  50.  
  51. if(choice=state)
  52. {
  53. prompt for two state letter abbreviation
  54.  
  55. search for state
  56.  
  57. display alphabetical list of all cities within that state
  58. showing information on all the people in the database born
  59. in each city
  60. }
  61. else
  62. {
  63. prompt for two-letter state abbreviation
  64.  
  65. prompt for city name
  66.  
  67. search for city with a matching name
  68.  
  69. display information on all the people who were born in that city.
  70. }
  71. }
  72. //END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement