Implementation of teacher class