Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do programming texts always use an "Employee" entity? [closed]

Tags:

entity

Is there something special about an Employee entity that makes it desirable to use it so frequently in programming texts?

Are there any other entities that would serve just as well?

like image 729
J McConnell Avatar asked Dec 14 '25 12:12

J McConnell


1 Answers

Obviously; anything specifying a hierarchy will be helpful; Employee is used because it's most common and trivially understood conceptually (i.e. it's easy to visualise). It's harder to visualise B : A.

In case it's not obvious; it's used because it's useful for learning about OO in terms of the hierarchy/polymorphism functions, and allows it to direct relate to something almost everyone has experience with.

like image 163
Noon Silk Avatar answered Dec 16 '25 23:12

Noon Silk