Hi all,
I have faced this problem quite often during the last couple of months, during which I've been building this system. The scenario is this: I have this kind of object that essentially is a list of other objects, but has some other properties specific of its nature. For example:
- Class
Tests
:- Contains many
Test
objects - Has properties:
DefaultTimeouts
DefaultNumberOfTries
- Contains many
Should I have this class subclass List<Test>
or should I have it inheriting from Object
, simply having the list as a property beside the other fields?
I know that this may be a bit subjective and personal taste might play a role here, but I'd wholeheartedly like to know your opinion on this.