A Java simulation for the herding problem