Class hierarchy
A class hierarchy is an inheritance-based organization of classes connected through superclass and subclass relationships, from general types to specialized ones.
Julia as a Second Language
A type hierarchy is an arrangement of types in parent-child relationships that distinguishes abstract types from concrete types.
- How it is used
- Organizes related Julia types for typed collections and method selection.
- How deep it goes
- Works through ancestry queries and subtype declarations, while noting that shared fields in the example are conventional rather than enforced.
- Examples
- Traces `Int64` to `Any`, tests subtype relationships, and groups archers, pikemen, and knights beneath a warrior type.
- What you can do after
- Build it from scratch with `abstract type` and `mutable struct`, then inspect ancestry and test subtype relationships in Julia.
Read how Julia as a Second Language explains class hierarchy →
The Well-Grounded Python Developer: How the pros use Python and Flask
A class hierarchy is an inheritance-oriented arrangement of classes in which related classes are organized into parent and child relationships.
- How it is used
- Organizes related application objects so shared functionality remains controlled and reusable.
- How deep it goes
- Explains inheritance through Shape subclasses, overrides, IS-A relationships, and super(), while stopping short of broader hierarchy design guidance.
- Examples
- Uses Shape, Rectangle, Square, and Circle classes to demonstrate shared state, specialized drawing, constructors, and onscreen rendering.
- What you can do after
- Build it from scratch by defining parent and child classes, overriding behavior, and reusing parent initialization with super().
Data-Oriented Programming: Reduce software complexity
A class hierarchy is an arrangement of classes connected by inheritance relationships.
- How it is used
- Organizes shared and specialized behavior in object-oriented library-system designs.
- How deep it goes
- Explains inheritance and requirement-driven hierarchy changes, stopping short of implementation details beyond class methods.
- Examples
- Uses User, Member, Librarian, VIPMember, login behavior, and adding book items as concrete examples.
- What you can do after
- Evaluate why adding a capability to a class hierarchy can require structural changes instead of straightforward code reuse.
Read how Data-Oriented Programming: Reduce software complexity explains class hierarchy →
Python Workout, Second Edition
A class hierarchy is an organization of classes into parent-child relationships that represent shared and specialized behavior.
- How it is used
- Organizes related Python classes so specialized types inherit shared behavior and require less repeated code.
- How deep it goes
- Explains inheritance through animal-class design questions, but stops short of a complete implementation.
- Examples
- Uses Animal, Wolf, Sheep, Snake, Parrot, and leg-count subclasses to explore hierarchy design and repr behavior.
- What you can do after
- Build it from scratch by designing parent and child classes, choosing shared initialization, and reusing inherited methods.
Read how Python Workout, Second Edition explains class hierarchy →
Related concepts
- union typeequivalent to · A union type is a type whose values can be any one of several specified alternative types or variants.
- inheritanceimplements · Inheritance is a mechanism by which a child type or element receives properties, values, or behavior from a parent, subject to system rules and possible overrides.
- Hibernateaddressed by · Hibernate is a Java object-relational mapping and persistence framework that maps application objects to relational database data.
- sealed typeconfigured by · A sealed type is a class or interface that restricts which other types may directly extend or implement it to a permitted set.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



