In the client, the address in not hardcoded, it is in the App.Config file.
In the service, the address is hardcoded. That's because this is a sample application. Modifying the service/host to use a configuration file for it's addresses would be a useful excercise for the reader.