liveBook · Manning

Class hierarchy

Also called type 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.

How 4 Manning books explain it

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().

Read how The Well-Grounded Python Developer: How the pros use Python and Flask explains class hierarchy →

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

What to know first

Related concepts

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.