Java interfaces in CS 1 textbooks

Thomas VanDrunen
2006 Companion to the 21st ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications - OOPSLA '06  
Java's interface construct allows for a clear distinction between subtype polymorphism based on a shared interface and code reuse based on class extension or inheritance. Design Patterns argues that in an object-oriented setting, programming should be done to an interface, not to an implementation, that class inheritance is a mechanism for code reuse rather than for subtyping and polymorphism, and that even composition should be favored over class inheritance. We conclude from this that
more » ... e should be introduced prior to and given more focus than abstract classes and class inheritance. We survey 27 textbooks from major publishers to show that very few available texts teach Java this way. We propose an alternative ordering of material that will promote the principles mentioned above.
doi:10.1145/1176617.1176738 dblp:conf/oopsla/VanDrunen06 fatcat:c3w3wdnf6zgrvecygkbaukcgxa