Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Method Signature

CityStateZip getCityState(String zip);

Description

Takes a zip and does a city and state lookup with the United States Postal Service.

Result

A CityStateZip object.

Discussion

  1. Make the remote call
  2. Check to make sure the result is not null. If it is, a system error occurred.
  3. Check CityStateZip .validZip flag. If false, the zip was invalid.
  4. If zip was valid, city and state will be populated and may be used.

...