Suggest you read the book. That way you will learn not only the answer to your question but many other things. This is not the homework network.
This is a Simple Dialog Demo.