simple Modular Machine Learning program in Java