Type hierarchy is a term used in object-oriented programming. The type hierarchy arranges types in supertype-subtype relationships. It is based on the fact that operations on values of a subtype behave in the same way as on values of the supertype. In the case of object types, this means that the class that implements the subtype has arisen from the class of the supertype by inheritance with transfer of the protocol. In many object-oriented languages, this is always enforced.