--

Thanks Javier for the feedback,

a) I'll correct the implements part and I agree that it does require a dashed line

b) I feel that Composition is required here. Since, lifetime of both the Display objects is tied to the Handler class. So, its a stronger form of aggregation. At least for the given code, the display objects can't exist independently. Let me know your thoughts on this.

--

--

Animesh Gaitonde
Animesh Gaitonde

Written by Animesh Gaitonde

SDE-3/Tech Lead @ Amazon| ex-Airbnb | ex-Microsoft. Writes about Distributed Systems, Programming Languages & Tech Interviews

Responses (1)