Command: sync post code blocks to repo exactly, Java 25, split merged commands, add H6 file labels and README mapping
This commit is contained in:
16
README.md
16
README.md
@@ -322,6 +322,22 @@ javac 03-behavioral/chain-of-responsibility/*.java -d out/chain
|
||||
java -cp out/chain chain.Main
|
||||
```
|
||||
|
||||
### Command (`03-behavioral/command/`)
|
||||
|
||||
| Post Section | File(s) |
|
||||
|---|---|
|
||||
| Step 1 — Command Interface | `Command.java` |
|
||||
| Step 2 — The Receiver (TextEditor) | `TextEditor.java` |
|
||||
| Step 3 — Concrete Commands | `InsertCommand.java`, `DeleteCommand.java` |
|
||||
| Step 4 — The Invoker (CommandHistory) | `CommandHistory.java` |
|
||||
| Demo | `Main.java` |
|
||||
|
||||
Run it:
|
||||
```bash
|
||||
javac 03-behavioral/command/*.java -d out/command
|
||||
java -cp out/command command.Main
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
- *Design Patterns: Elements of Reusable Object-Oriented Software* — Gamma, Helm, Johnson, Vlissides
|
||||
|
||||
Reference in New Issue
Block a user