Added last section of code to call the teach and learn methods from instances in each class