c++ - Java: No interface implementation? -


Today I found my book "Head First Design Pattern" in the mail so far, although I have very interesting stuff There is a question about.

I do not have any Java / C # background nor do I just want to jump in those languages ​​(I'm trying to focus on C ++ first). The book states that there is no implementation for interfaces in Java ... it will mean that for every change in that interface, you have to modify all the subclasses which implement the interface.

How is it done in C ++? What am i missing

What does the author of the book mean, if you change the signature of the members, add the interface or the new one , You will also need to make these changes in the implementing classes so that they continue to implement the interface.

The length of time you want, you can change the applicable sections. The members of the interface are implemented with the exact same signature (i.e., with the same name, the type of return and parameter Order and type).

I have the impression that you do not quite understand how the interfaces work, so I suggest reading the subject which I think is quite clear on the subject (and it is very much in Java In addition, in Java you use the keyword " applies " instead of "Bonus" (:) to declare that a class applies a specific interface).


Comments