On 25. 7. 2019 4:27, Richard O'Keefe wrote:
Comment 2.
?? This is a poor design.?? As it is, any object can replace the tracks
of an artist
?? with *anything*.?? And even without doing that, any object can add and
remove
?? items to an artist's tracks, even if the added items are not Tracks.
?? There are a number of OO design principles, notably the Law of
Demeter and
?? of course the GRASP patterns, which basically say "never mutate another
?? object's parts, ask IT to do the mutation."
As outlined nicely in this classic:
https://alanknightsblog.blogspot.com/2011/10/principles-of-oo-design-or-everything-i.html.