1
vote
1answer
273 views

Internal exposure of implementation details on inheritance

I'm reading the "Effective Java" book which suggests to favor composition over inheritance. The example it gives shows something like this: public class InstrumentedHashSet<E> extends ...
3
votes
2answers
1k views

OOP - Composition, Components and Composites Example?

I've been reading a bit about OOP in relation to Composition, Components and Composites. I believe I understand the fundamental principle (not sure). Can someone please provide a code example of a ...