Sunday 29 November 2015

Learning Java Collections and Interfaces with Frogs, Sheep and Owls

A couple of days ago a funny drawing from Twitter caught my eye. I thought it would make a good exercise for kids learning Java. Here it is:
I quickly drafted a model and saved it at GitHub:

I had thought the exercise would be easy, but when I started to sketch a program to solve the puzzle I realized that was not the case. Knowledge of Java collections and interfaces seemed to be neccessary. Moreover, teaching the computer how to determine X, knowing that X*X*X = 27, raised unexpected issues:
What do you think? Are these quizzes helpful in teaching kids programming?

I am looking forward to your opinions in the comments below or at Moodle Cloud.