Decorator Design Pattern – Simple Java Example

Sandwich.java

Loaf.java

SandwichDecorator.java

Bacon.java

Cheese.java

Starter.java

Observer Design Pattern – Simple Java Example

Observer.java

Subject.java

TemperatureListener.java

Weather.java

Starter.java

State Design Pattern – Simple Java Example

WeaponState.java

WeaponHasAmmoState.java

WeaponHasNoAmmoState.java

Weapon.java

Starter.java

Strategy Design Pattern – Simple Java Example

Job.java


Human.Java

SuperHero.java

Engineer.java

Bob.java

John.java

Starter.java

Builder Pattern – Simple Java Example