Add creational patterns, Interpreter; remove scripts; update README
This commit is contained in:
25
README.md
25
README.md
@@ -1,6 +1,8 @@
|
||||
# GoF Design Patterns in Java
|
||||
|
||||
Complete runnable Java 17 implementations of all 23 Gang of Four design patterns. Each pattern has a dedicated article at [ankurm.com](https://ankurm.com/gof-design-patterns-java/) with a UML diagram, step-by-step explanation, and console output.
|
||||
Complete runnable Java 17 implementations of all 23 Gang of Four design patterns.
|
||||
Each pattern has a dedicated article at [ankurm.com](https://ankurm.com/gof-design-patterns-java/)
|
||||
with a UML diagram, step-by-step explanation, and console output.
|
||||
|
||||
## Structure
|
||||
|
||||
@@ -41,27 +43,16 @@ design-patterns/
|
||||
|
||||
## Run any pattern
|
||||
|
||||
```powershell
|
||||
# Windows (PowerShell)
|
||||
$JAVAC = 'C:\Program Files\Eclipse Adoptium\jdk-17.0.7.7-hotspot\bin\javac.exe'
|
||||
$JAVA = 'C:\Program Files\Eclipse Adoptium\jdk-17.0.7.7-hotspot\bin\java.exe'
|
||||
|
||||
& $JAVAC 03-behavioral/strategy/*.java -d out/strategy
|
||||
& $JAVA -cp out/strategy strategy.Main
|
||||
```
|
||||
|
||||
```bash
|
||||
# Linux / macOS
|
||||
# Linux / macOS / Git Bash (Windows)
|
||||
javac 03-behavioral/strategy/*.java -d out/strategy
|
||||
java -cp out/strategy strategy.Main
|
||||
```
|
||||
|
||||
## Run all behavioral patterns (Windows)
|
||||
|
||||
Double-click `RUN-behavioral.bat` or run in PowerShell:
|
||||
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -File run-behavioral.ps1
|
||||
```cmd
|
||||
REM Windows Command Prompt
|
||||
javac 03-behavioral\strategy\*.java -d out\strategy
|
||||
java -cp out\strategy strategy.Main
|
||||
```
|
||||
|
||||
## Articles
|
||||
|
||||
Reference in New Issue
Block a user