liveBook · Manning

Subclass

A subclass is a class derived from another class that inherits, extends, or specializes its structure or behavior.

How 2 Manning books explain it

Essential TypeScript 5, Third Edition

A subclass is a class derived from another class that can inherit or extend its members and behavior.

How it is used
Extends existing classes to add specialized behavior, including persistent storage, collection retrieval, and decorator-added methods.
How deep it goes
Works through constructors, protected access, array type inference, and abstract methods; flags the type limitation of decorator-created subclasses.
Examples
Uses employee and customer arrays, a JSON-backed to-do collection, an abstract collection, and a decorator that adds serialization.
What you can do after
Build it from scratch by extending a class, initializing its superclass, and annotating mixed-subclass arrays when needed.

Read how Essential TypeScript 5, Third Edition explains subclass →

The Well-Grounded Python Developer: How the pros use Python and Flask

A child class is a class that inherits attributes or behavior from a parent class.

How it is used
Uses inheritance to reduce repeated code and organize related objects into maintainable class hierarchies.
How deep it goes
Explains inheritance terminology, syntax, specialization, and a shape hierarchy, but does not catalog advanced inheritance mechanics.
Examples
Demonstrates ParentClass, Shape, Rectangle, Square, and Circle through screen-drawing classes and a UML relationship.
What you can do after
Build subclass hierarchies in Python that reuse shared initialization and customize class-specific behavior.

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

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.