Class hierarchy
A class hierarchy is an organization of related classes connected by inheritance relationships, typically from more general base classes to more specialized derived classes.
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 Julia types into parent–child relationships for exploring types and modeling application entities.
- How deep it goes
- Explains hierarchy traversal, subtype tests, abstract and concrete types, and defining a small hierarchy.
- Examples
- Uses the numeric hierarchy, typed arrays, and a battle simulator with warrior subtypes.
- What you can do after
- Apply it via Julia’s typeof, supertype, subtypes, and <: to explore relationships and define subtypes.
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 →
Also covered in
- Python How-To
- Practices of the Python Pro
- Java Persistence with Spring Data and Hibernate epub
- Python Workout: 50 ten-minute exercises
- Kotlin in Action, 2E
What to know first
- attributeAn attribute is a named property or piece of information associated with an entity, object, or structured data item.
- methodA method is a callable function or operation associated with a type, class, or object and invoked through that association.
- objectAn object is a distinct entity represented or manipulated within a computational system, typically as a value, data structure, resource, or instance of a type.
- primitive typeA primitive type is a predefined basic data type representing a simple value rather than a composite structure of multiple values or fields.
Related concepts
- hierarchykind of · A hierarchy is an organization of entities into levels or nested groups connected by parent-child, containment, or broader-to-narrower relationships.
- union typeequivalent to · A union type is a type whose values can represent one of several specified alternative types or variants.
- inheritanceimplements · Inheritance is a mechanism in which a derived type or descendant element receives properties or behavior from a parent, subject to rules that may allow specialization or overriding.
- concrete typehas part · A concrete type is a fully specified, directly implementable or instantiable type with a particular representation and behavior.
Questions about class hierarchy
What is class hierarchy?
A class hierarchy is an organization of related classes connected by inheritance relationships, typically from more general base classes to more specialized derived classes.
Which Manning books explain class hierarchy?
Julia as a Second Language, The Well-Grounded Python Developer: How the pros use Python and Flask, Data-Oriented Programming: Reduce software complexity and Python Workout, Second Edition.
What should I know before learning class hierarchy?
Manning books that teach class hierarchy usually introduce attribute, method, object and primitive type first.
What is class hierarchy a kind of?
Class hierarchy is a kind of hierarchy. A hierarchy is an organization of entities into levels or nested groups connected by parent-child, containment, or broader-to-narrower relationships.
What are the parts of class hierarchy?
Class hierarchy includes concrete type.
What is class hierarchy also called?
Class hierarchy is also called type hierarchy.
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.



