I've been teaching OOP and was trying to convey to my students the important difference between inheritance and the creation of a subtype relation between two types. For example, in C++, I could use private inheritance to ensure that nobody outside sees the subtyping relation.
However, while I can think of a lot of situations where I wouldn't want to create a subtyping relation (e.g., implementing a Stack via a doubly-linked list class), I can't really think of good design examples where I would actually choose to follow inheritance without creating a public subtying relation (rather than, say, use aggregation).
Any ideas of good examples?