by bedobi · 2y ago · 0 comments
if you have a person class and you have students and teachers
the correct thing to to is NOT to make student and teacher inherit from person
it's to make student and teacher have a person attribute + the other attributes that constitute a student and teacher respectively
Any big enough system will have parts that are most sensibly built object-oriented, and other parts that are more reasonably functional, plus anything else you can think of.