Matt, potential problems in your states program.

by Moneo (Login emoneo)

 

Matt,

You enter the state names as such. How about the spelling of these, e.g.,
How many "s" and "t" in Massachusetts?
How many "s" and "p" in Mississippi?
How many "n" in Connecticut?

If the names of the states are not spelled correctly, then you will not be able to determine duplicates, and you will not be able to delete a state (unless you know the original spelling.) Given this type of error, you could end up with 50 state names which don't match the real 50 names of the states, or actually have less than 50 valid state names in your array.

One possible solution is to use the official USPS abbreviations for the states. But, this gets tricky because states beginning with "M" or "N" do not necessary have intuitive abbreviations.

I'll let you think about this. You might ask your teacher about it.

Regards..... Moneo

Posted on May 24, 2012, 6:06 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
Extract characters to compareSolitaire on May 24
 * You're right Solitaire, it can get tricky.Moneo on May 25
 re:extract charactersMatt on May 28
Try using the SOUNDEX function.Clippy on May 25

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement