liveBook · Manning

Class hierarchy

A class hierarchy is an inheritance-based organization of classes connected through superclass and subclass relationships, from general types to specialized ones.

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

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 →

Related concepts

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.