Add teacher example with encapsulation