LLD Logo
LVL1
State Pattern

Step 1 of 4 · Define state behavior

1

Your task

Define state behavior

Give each document state the same edit and publish operations.

Create the state abstraction.
Pass the document to state operations so a state can transition its context.

document_state.py

Your draft · saved locally

1

Structural feedback only—your code stays in this browser and is not executed.