• Post Reply Bookmark Topic Watch Topic
  • New Topic

Class Interface Implementation  RSS feed

 
Tony Diggs
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Class may implement as many interfaces as needed, but does this
become confusing after a while ?
Tony
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could, if you implement a bunch of unrelated interfaces in a single class for no good reason. Good OO design technique is to limit the complexity of any single component. So don't give a class a bunch of unrelated responsibilities just because you can. There are numerous strategies for limiting complexity - the OO/Patterns forum is a good place to learn more.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!