I just stumbled over an interesting problem with naming.
I am writing automated tests for an Object-Relational mapper.
This involves using super-generic classes that exist solely to exercise certain relationships.
My test first involved composition: One object held another object which held a collection of objects:
Entity => ParentComponent => Bag => ChildComponent.
This naming seemed to make sense - one parent had many children.
But then I wanted to expand my tests for a class that inherits from Entity
. I instinctively named it ChildEntity
Entity => ParentComponent => Bag => ChildComponent
^
|
ChildEntity
This now gets confusing! I'm using Parent/Child labeling to denote inheritance, and I'm also using Parent/Child labeling to denote composition.
Is there some standard labeling nomenclature I can use that differentiates between the two relationship types?