heres my question:
which tend to change more frequently: interfaces or implementations? How does proper OO design take advantage of this observation?

I think the answer is implementations

7 Years
Discussion Span
Last Post by darkagn

I would probably agree with that, but why do you think that implementations change more often than interfaces?


implementations implement the interface members. interface doesn't really do much other than have some items, which you can't change in the code. while implementation can change data of the items in it.

is this about right or atleast close?


You are on the right track, but try to think of interface in this question as WHAT something does, while implementations are HOW something does it. What are the repercussions of changing WHAT something does as opposed to HOW it does it?

Imagine you write an application that uses code that I have written. What happens to your application if I change HOW my code does something? What happens to your application if I change WHAT my code can do?

Edited by darkagn: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.