by karmakaze · 3y ago · 0 comments
I would have made the sharing explicit during composition--a Teacher or Student is given the Person instance when constructed, so sharing or not sharing is decided at composition time. To enforce consistency use helper/static methods.