admin wrote:
The question is not talking about whether you can use composition for something unrelated.
It doesn't rule that out which is the problem. Since we both agree all the classes in your examples both can and commonly use composition, all of them are valid answers to your question
as printed.
The question is giving you a situation (or a problem, if you will)and asking you if you will use composition to solve that problem.
No its not. Two of the possible answers are just types of classes, there's no question or problem described. So does that type of class use composition? Why wouldn't it?
I mean i can understand your intention for the question and how all the answers might not fit your intention, but for your question
as its written all of the answers are valid.