The program named Alice0135b

Display Figure 4.

In this program, I will show you how to write a function that returns a value.

The world contains a coach and a chicken as shown in Figure 4.

We will write a new function for the coach object.

The new function makes it possible for code in the main method to send a message to the coach asking it how far it is from the chicken.

Figure 4. The coach and the chicken in program named Alice0135b.