Python Implicit Interfaces & the implements Keyword
Every class in Dart implicitly defines an **Interface** containing all of its instance members and getters. This means any class can act as an interface for another class via the `implements` keyword. While a class can only `extend` ONE superclass, it can `implement` MULTIPLE interfaces (`class C implements A, B`), providing powerful multiple-contract polymorphism.
"An implicit interface is like an actor playing a famous role: the actor doesn't share DNA with the historical figure (`extends`), but they memorize and deliver every single line and gesture of the character (`implements`)."
Deep Dive: How It Works
Implicit Interface: You don't need a separate `interface` keyword to define contracts; every standard class automatically acts as an interface.
extends vs implements: `extends` inherits implementation code; `implements` forces the subclass to re-implement every single field and method.
Multiple Interfaces: A single class can implement multiple independent interfaces (`implements Serializable, Comparable, Disposable`).
Syntax Blueprint
class AuthenticLogger implements Printer, Formatter {
@override
void printMessage(String msg) { ... }
@override
String format(String raw) { ... }
}Implementing multiple implicit class interfaces.
Core Rules to Remember



Common Beginner Traps & How to Fix Them
Using `implements` and expecting to inherit the parent class's method bodies.Why it happens: Confusing `extends` (code inheritance) with `implements` (interface contract).
How to fix: Use `extends` if you want to inherit implementation code; use `implements` if you only want the type contract.
Live Interactive Example
Hit Run Code to see it liveYour Turn: Micro Challenge
No pressure! Edit the starter code below and test your solution with instant feedback.
Implement Runner Interface
Create class `Runner { void run() {} }`.
Create class `Athlete implements Runner { @override void run() => print("Athlete running!"); }`.
In `main()`, instantiate `Athlete().run();`.
Finished reading and practicing?
Mark this lesson as completed to update your course progress.