Creating a sample application using a protocol and a delegate