F
F
Frip2020-10-04 20:44:48
UML
Frip, 2020-10-04 20:44:48

Can an interface have multiple implementations? How to use the required implementation?

Suppose there is some interface that provides a method that accepts an array of data (no matter what kind or what data format) and depending on this data, one or another implementation of the interface should be used.

1) Actually, is it possible at all in UML that 1 interface could have several implementations
2) If so, how should a specific interface implementation be selected, exactly the one that is needed?

While searching, I came across the Factory and Strategy patterns, but I don’t quite understand if they are applicable in my context.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question