defined the methods learn and teach