├── .github └── workflows │ └── send_new_pr_email.yml ├── .gitignore ├── .idea ├── .gitignore ├── codeStyles ├── kotlinc.xml ├── misc.xml └── vcs.xml ├── Design Patterns & Principles.png ├── LICENSE ├── README.md └── src ├── abstractfactory └── pizzastoreexample │ ├── PizzaTestDrive.kt │ ├── factory │ ├── NYPizzaIngredientFactory.kt │ └── PizzaIngredientFactory.kt │ ├── ingredients │ ├── Cheese.kt │ ├── Clams.kt │ ├── Dough.kt │ ├── Pepperoni.kt │ ├── Sauce.kt │ └── Veggies.kt │ ├── pizza │ ├── CheesePizza.kt │ ├── ClamPizza.kt │ └── Pizza.kt │ └── pizzastore │ ├── NYPizzaStore.kt │ └── PizzaStore.kt ├── adapter └── ducksimulator │ ├── DuckTestDrive.kt │ ├── adapter │ └── TurkeyAdapter.kt │ ├── duck │ ├── Duck.kt │ └── MallardDuck.kt │ └── turkey │ ├── Turkey.kt │ └── WildTurkey.kt ├── command ├── RemoteLoader.kt ├── RemoteLoaderWithUndo.kt ├── command │ ├── Command.kt │ ├── LightOffCommand.kt │ ├── LightOnCommand.kt │ ├── MacroCommand.kt │ ├── NoCommand.kt │ ├── StereoOffCommand.kt │ └── StereoOnWithCDCommand.kt ├── invoker │ ├── RemoteControl.kt │ └── RemoteControlWithUndo.kt └── receiver │ ├── Light.kt │ └── Stereo.kt ├── composite └── dinermenu │ ├── MenuTestDrive.kt │ ├── client │ └── Waitress.kt │ ├── iterable │ ├── Menu.kt │ ├── MenuComponent.kt │ └── MenuItem.kt │ └── iterator │ ├── CompositeIterator.kt │ └── NullIterator.kt ├── decorator └── coffeeshop │ ├── Beverage.kt │ ├── CoffeeShop.kt │ ├── CondimentDecorator.kt │ ├── beverages │ ├── Espresso.kt │ └── HouseBlend.kt │ └── condiments │ ├── Mocha.kt │ ├── Soy.kt │ └── Whip.kt ├── facade └── hometheaterexample │ ├── HomeTheaterTestDrive.kt │ ├── facade │ └── HomeTheaterFacade.kt │ └── subsystems │ ├── Amplifier.kt │ ├── DvdPlayer.kt │ ├── PopcornPopper.kt │ ├── Projector.kt │ ├── Screen.kt │ └── TheaterLights.kt ├── factorymethod └── pizzastoreexample │ ├── PizzaTestDrive.kt │ ├── pizza │ ├── ChicagoStyleCheesePizza.kt │ ├── NYStyleCheesePizza.kt │ └── Pizza.kt │ └── pizzastore │ ├── ChicagoPizzaStore.kt │ ├── NYPizzaStore.kt │ └── PizzaStore.kt ├── iterator └── dinermenu │ ├── inbuilt │ ├── MenuTestDrive.kt │ ├── client │ │ └── Waitress.kt │ ├── iterable │ │ └── DinerMenu.kt │ └── iterator │ │ └── DinerMenuIterator.kt │ └── scratch │ ├── MenuTestDrive.kt │ ├── client │ └── Waitress.kt │ ├── data │ └── MenuItem.kt │ ├── iterable │ └── DinerMenu.kt │ └── iterator │ ├── DinerMenuIterator.kt │ └── Iterator.kt ├── observer └── weatherdata │ ├── inbuilt │ ├── CurrentConditionsDisplay.kt │ ├── WeatherData.kt │ └── WeatherStation.kt │ └── scratch │ ├── CurrentConditionsDisplay.kt │ ├── DisplayElement.kt │ ├── Observer.kt │ ├── Subject.kt │ ├── WeatherData.kt │ └── WeatherStation.kt ├── proxy └── protectionproxy │ └── commandexecutor │ ├── ProtectionProxyPatternTest.kt │ ├── proxy │ └── CommandExecutorProxy.kt │ ├── realsubject │ └── CommandExecutorImpl.kt │ └── subject │ └── CommandExecutor.kt ├── singleton ├── kotlinobject │ └── Singleton.kt └── scratch │ └── Singleton.kt ├── state └── gumballmachine │ ├── GumballMachineTestDrive.kt │ ├── context │ └── GumballMachine.kt │ └── state │ ├── HasQuarterState.kt │ ├── NoQuarterState.kt │ ├── SoldOutState.kt │ ├── SoldState.kt │ ├── State.kt │ └── WinnerState.kt ├── strategy └── actiongame │ ├── Game.kt │ ├── behaviour │ └── weapon │ │ ├── AxeBehavior.kt │ │ ├── BowAndArrowBehavior.kt │ │ ├── KnifeBehavior.kt │ │ ├── SwordBehavior.kt │ │ └── WeaponBehavior.kt │ └── character │ ├── Character.kt │ ├── King.kt │ ├── Knight.kt │ ├── Queen.kt │ └── Troll.kt └── templatemethod └── caffeinebeverage ├── BeverageTestDrive.kt └── beverages ├── CaffeineBeverage.kt ├── Coffee.kt └── Tea.kt /.github/workflows/send_new_pr_email.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/.github/workflows/send_new_pr_email.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/.gitignore -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/codeStyles: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/.idea/codeStyles -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/.idea/kotlinc.xml -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/.idea/misc.xml -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/.idea/vcs.xml -------------------------------------------------------------------------------- /Design Patterns & Principles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/Design Patterns & Principles.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/README.md -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/PizzaTestDrive.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/PizzaTestDrive.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/factory/NYPizzaIngredientFactory.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/factory/NYPizzaIngredientFactory.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/factory/PizzaIngredientFactory.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/factory/PizzaIngredientFactory.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/ingredients/Cheese.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/ingredients/Cheese.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/ingredients/Clams.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/ingredients/Clams.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/ingredients/Dough.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/ingredients/Dough.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/ingredients/Pepperoni.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/ingredients/Pepperoni.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/ingredients/Sauce.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/ingredients/Sauce.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/ingredients/Veggies.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/ingredients/Veggies.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/pizza/CheesePizza.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/pizza/CheesePizza.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/pizza/ClamPizza.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/pizza/ClamPizza.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/pizza/Pizza.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/pizza/Pizza.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/pizzastore/NYPizzaStore.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/pizzastore/NYPizzaStore.kt -------------------------------------------------------------------------------- /src/abstractfactory/pizzastoreexample/pizzastore/PizzaStore.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/abstractfactory/pizzastoreexample/pizzastore/PizzaStore.kt -------------------------------------------------------------------------------- /src/adapter/ducksimulator/DuckTestDrive.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/adapter/ducksimulator/DuckTestDrive.kt -------------------------------------------------------------------------------- /src/adapter/ducksimulator/adapter/TurkeyAdapter.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/adapter/ducksimulator/adapter/TurkeyAdapter.kt -------------------------------------------------------------------------------- /src/adapter/ducksimulator/duck/Duck.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/adapter/ducksimulator/duck/Duck.kt -------------------------------------------------------------------------------- /src/adapter/ducksimulator/duck/MallardDuck.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/adapter/ducksimulator/duck/MallardDuck.kt -------------------------------------------------------------------------------- /src/adapter/ducksimulator/turkey/Turkey.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/adapter/ducksimulator/turkey/Turkey.kt -------------------------------------------------------------------------------- /src/adapter/ducksimulator/turkey/WildTurkey.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/adapter/ducksimulator/turkey/WildTurkey.kt -------------------------------------------------------------------------------- /src/command/RemoteLoader.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/RemoteLoader.kt -------------------------------------------------------------------------------- /src/command/RemoteLoaderWithUndo.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/RemoteLoaderWithUndo.kt -------------------------------------------------------------------------------- /src/command/command/Command.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/command/Command.kt -------------------------------------------------------------------------------- /src/command/command/LightOffCommand.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/command/LightOffCommand.kt -------------------------------------------------------------------------------- /src/command/command/LightOnCommand.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/command/LightOnCommand.kt -------------------------------------------------------------------------------- /src/command/command/MacroCommand.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/command/MacroCommand.kt -------------------------------------------------------------------------------- /src/command/command/NoCommand.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/command/NoCommand.kt -------------------------------------------------------------------------------- /src/command/command/StereoOffCommand.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/command/StereoOffCommand.kt -------------------------------------------------------------------------------- /src/command/command/StereoOnWithCDCommand.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/command/StereoOnWithCDCommand.kt -------------------------------------------------------------------------------- /src/command/invoker/RemoteControl.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/invoker/RemoteControl.kt -------------------------------------------------------------------------------- /src/command/invoker/RemoteControlWithUndo.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/invoker/RemoteControlWithUndo.kt -------------------------------------------------------------------------------- /src/command/receiver/Light.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/receiver/Light.kt -------------------------------------------------------------------------------- /src/command/receiver/Stereo.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/command/receiver/Stereo.kt -------------------------------------------------------------------------------- /src/composite/dinermenu/MenuTestDrive.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/composite/dinermenu/MenuTestDrive.kt -------------------------------------------------------------------------------- /src/composite/dinermenu/client/Waitress.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/composite/dinermenu/client/Waitress.kt -------------------------------------------------------------------------------- /src/composite/dinermenu/iterable/Menu.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/composite/dinermenu/iterable/Menu.kt -------------------------------------------------------------------------------- /src/composite/dinermenu/iterable/MenuComponent.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/composite/dinermenu/iterable/MenuComponent.kt -------------------------------------------------------------------------------- /src/composite/dinermenu/iterable/MenuItem.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/composite/dinermenu/iterable/MenuItem.kt -------------------------------------------------------------------------------- /src/composite/dinermenu/iterator/CompositeIterator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/composite/dinermenu/iterator/CompositeIterator.kt -------------------------------------------------------------------------------- /src/composite/dinermenu/iterator/NullIterator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/composite/dinermenu/iterator/NullIterator.kt -------------------------------------------------------------------------------- /src/decorator/coffeeshop/Beverage.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/decorator/coffeeshop/Beverage.kt -------------------------------------------------------------------------------- /src/decorator/coffeeshop/CoffeeShop.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/decorator/coffeeshop/CoffeeShop.kt -------------------------------------------------------------------------------- /src/decorator/coffeeshop/CondimentDecorator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/decorator/coffeeshop/CondimentDecorator.kt -------------------------------------------------------------------------------- /src/decorator/coffeeshop/beverages/Espresso.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/decorator/coffeeshop/beverages/Espresso.kt -------------------------------------------------------------------------------- /src/decorator/coffeeshop/beverages/HouseBlend.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/decorator/coffeeshop/beverages/HouseBlend.kt -------------------------------------------------------------------------------- /src/decorator/coffeeshop/condiments/Mocha.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/decorator/coffeeshop/condiments/Mocha.kt -------------------------------------------------------------------------------- /src/decorator/coffeeshop/condiments/Soy.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/decorator/coffeeshop/condiments/Soy.kt -------------------------------------------------------------------------------- /src/decorator/coffeeshop/condiments/Whip.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/decorator/coffeeshop/condiments/Whip.kt -------------------------------------------------------------------------------- /src/facade/hometheaterexample/HomeTheaterTestDrive.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/facade/hometheaterexample/HomeTheaterTestDrive.kt -------------------------------------------------------------------------------- /src/facade/hometheaterexample/facade/HomeTheaterFacade.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/facade/hometheaterexample/facade/HomeTheaterFacade.kt -------------------------------------------------------------------------------- /src/facade/hometheaterexample/subsystems/Amplifier.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/facade/hometheaterexample/subsystems/Amplifier.kt -------------------------------------------------------------------------------- /src/facade/hometheaterexample/subsystems/DvdPlayer.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/facade/hometheaterexample/subsystems/DvdPlayer.kt -------------------------------------------------------------------------------- /src/facade/hometheaterexample/subsystems/PopcornPopper.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/facade/hometheaterexample/subsystems/PopcornPopper.kt -------------------------------------------------------------------------------- /src/facade/hometheaterexample/subsystems/Projector.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/facade/hometheaterexample/subsystems/Projector.kt -------------------------------------------------------------------------------- /src/facade/hometheaterexample/subsystems/Screen.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/facade/hometheaterexample/subsystems/Screen.kt -------------------------------------------------------------------------------- /src/facade/hometheaterexample/subsystems/TheaterLights.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/facade/hometheaterexample/subsystems/TheaterLights.kt -------------------------------------------------------------------------------- /src/factorymethod/pizzastoreexample/PizzaTestDrive.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/factorymethod/pizzastoreexample/PizzaTestDrive.kt -------------------------------------------------------------------------------- /src/factorymethod/pizzastoreexample/pizza/ChicagoStyleCheesePizza.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/factorymethod/pizzastoreexample/pizza/ChicagoStyleCheesePizza.kt -------------------------------------------------------------------------------- /src/factorymethod/pizzastoreexample/pizza/NYStyleCheesePizza.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/factorymethod/pizzastoreexample/pizza/NYStyleCheesePizza.kt -------------------------------------------------------------------------------- /src/factorymethod/pizzastoreexample/pizza/Pizza.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/factorymethod/pizzastoreexample/pizza/Pizza.kt -------------------------------------------------------------------------------- /src/factorymethod/pizzastoreexample/pizzastore/ChicagoPizzaStore.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/factorymethod/pizzastoreexample/pizzastore/ChicagoPizzaStore.kt -------------------------------------------------------------------------------- /src/factorymethod/pizzastoreexample/pizzastore/NYPizzaStore.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/factorymethod/pizzastoreexample/pizzastore/NYPizzaStore.kt -------------------------------------------------------------------------------- /src/factorymethod/pizzastoreexample/pizzastore/PizzaStore.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/factorymethod/pizzastoreexample/pizzastore/PizzaStore.kt -------------------------------------------------------------------------------- /src/iterator/dinermenu/inbuilt/MenuTestDrive.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/iterator/dinermenu/inbuilt/MenuTestDrive.kt -------------------------------------------------------------------------------- /src/iterator/dinermenu/inbuilt/client/Waitress.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/iterator/dinermenu/inbuilt/client/Waitress.kt -------------------------------------------------------------------------------- /src/iterator/dinermenu/inbuilt/iterable/DinerMenu.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/iterator/dinermenu/inbuilt/iterable/DinerMenu.kt -------------------------------------------------------------------------------- /src/iterator/dinermenu/inbuilt/iterator/DinerMenuIterator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/iterator/dinermenu/inbuilt/iterator/DinerMenuIterator.kt -------------------------------------------------------------------------------- /src/iterator/dinermenu/scratch/MenuTestDrive.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/iterator/dinermenu/scratch/MenuTestDrive.kt -------------------------------------------------------------------------------- /src/iterator/dinermenu/scratch/client/Waitress.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/iterator/dinermenu/scratch/client/Waitress.kt -------------------------------------------------------------------------------- /src/iterator/dinermenu/scratch/data/MenuItem.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/iterator/dinermenu/scratch/data/MenuItem.kt -------------------------------------------------------------------------------- /src/iterator/dinermenu/scratch/iterable/DinerMenu.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/iterator/dinermenu/scratch/iterable/DinerMenu.kt -------------------------------------------------------------------------------- /src/iterator/dinermenu/scratch/iterator/DinerMenuIterator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/iterator/dinermenu/scratch/iterator/DinerMenuIterator.kt -------------------------------------------------------------------------------- /src/iterator/dinermenu/scratch/iterator/Iterator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/iterator/dinermenu/scratch/iterator/Iterator.kt -------------------------------------------------------------------------------- /src/observer/weatherdata/inbuilt/CurrentConditionsDisplay.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/observer/weatherdata/inbuilt/CurrentConditionsDisplay.kt -------------------------------------------------------------------------------- /src/observer/weatherdata/inbuilt/WeatherData.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/observer/weatherdata/inbuilt/WeatherData.kt -------------------------------------------------------------------------------- /src/observer/weatherdata/inbuilt/WeatherStation.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/observer/weatherdata/inbuilt/WeatherStation.kt -------------------------------------------------------------------------------- /src/observer/weatherdata/scratch/CurrentConditionsDisplay.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/observer/weatherdata/scratch/CurrentConditionsDisplay.kt -------------------------------------------------------------------------------- /src/observer/weatherdata/scratch/DisplayElement.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/observer/weatherdata/scratch/DisplayElement.kt -------------------------------------------------------------------------------- /src/observer/weatherdata/scratch/Observer.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/observer/weatherdata/scratch/Observer.kt -------------------------------------------------------------------------------- /src/observer/weatherdata/scratch/Subject.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/observer/weatherdata/scratch/Subject.kt -------------------------------------------------------------------------------- /src/observer/weatherdata/scratch/WeatherData.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/observer/weatherdata/scratch/WeatherData.kt -------------------------------------------------------------------------------- /src/observer/weatherdata/scratch/WeatherStation.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/observer/weatherdata/scratch/WeatherStation.kt -------------------------------------------------------------------------------- /src/proxy/protectionproxy/commandexecutor/ProtectionProxyPatternTest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/proxy/protectionproxy/commandexecutor/ProtectionProxyPatternTest.kt -------------------------------------------------------------------------------- /src/proxy/protectionproxy/commandexecutor/proxy/CommandExecutorProxy.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/proxy/protectionproxy/commandexecutor/proxy/CommandExecutorProxy.kt -------------------------------------------------------------------------------- /src/proxy/protectionproxy/commandexecutor/realsubject/CommandExecutorImpl.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/proxy/protectionproxy/commandexecutor/realsubject/CommandExecutorImpl.kt -------------------------------------------------------------------------------- /src/proxy/protectionproxy/commandexecutor/subject/CommandExecutor.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/proxy/protectionproxy/commandexecutor/subject/CommandExecutor.kt -------------------------------------------------------------------------------- /src/singleton/kotlinobject/Singleton.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/singleton/kotlinobject/Singleton.kt -------------------------------------------------------------------------------- /src/singleton/scratch/Singleton.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/singleton/scratch/Singleton.kt -------------------------------------------------------------------------------- /src/state/gumballmachine/GumballMachineTestDrive.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/state/gumballmachine/GumballMachineTestDrive.kt -------------------------------------------------------------------------------- /src/state/gumballmachine/context/GumballMachine.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/state/gumballmachine/context/GumballMachine.kt -------------------------------------------------------------------------------- /src/state/gumballmachine/state/HasQuarterState.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/state/gumballmachine/state/HasQuarterState.kt -------------------------------------------------------------------------------- /src/state/gumballmachine/state/NoQuarterState.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/state/gumballmachine/state/NoQuarterState.kt -------------------------------------------------------------------------------- /src/state/gumballmachine/state/SoldOutState.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/state/gumballmachine/state/SoldOutState.kt -------------------------------------------------------------------------------- /src/state/gumballmachine/state/SoldState.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/state/gumballmachine/state/SoldState.kt -------------------------------------------------------------------------------- /src/state/gumballmachine/state/State.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/state/gumballmachine/state/State.kt -------------------------------------------------------------------------------- /src/state/gumballmachine/state/WinnerState.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/state/gumballmachine/state/WinnerState.kt -------------------------------------------------------------------------------- /src/strategy/actiongame/Game.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/strategy/actiongame/Game.kt -------------------------------------------------------------------------------- /src/strategy/actiongame/behaviour/weapon/AxeBehavior.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/strategy/actiongame/behaviour/weapon/AxeBehavior.kt -------------------------------------------------------------------------------- /src/strategy/actiongame/behaviour/weapon/BowAndArrowBehavior.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/strategy/actiongame/behaviour/weapon/BowAndArrowBehavior.kt -------------------------------------------------------------------------------- /src/strategy/actiongame/behaviour/weapon/KnifeBehavior.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/strategy/actiongame/behaviour/weapon/KnifeBehavior.kt -------------------------------------------------------------------------------- /src/strategy/actiongame/behaviour/weapon/SwordBehavior.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/strategy/actiongame/behaviour/weapon/SwordBehavior.kt -------------------------------------------------------------------------------- /src/strategy/actiongame/behaviour/weapon/WeaponBehavior.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/strategy/actiongame/behaviour/weapon/WeaponBehavior.kt -------------------------------------------------------------------------------- /src/strategy/actiongame/character/Character.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/strategy/actiongame/character/Character.kt -------------------------------------------------------------------------------- /src/strategy/actiongame/character/King.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/strategy/actiongame/character/King.kt -------------------------------------------------------------------------------- /src/strategy/actiongame/character/Knight.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/strategy/actiongame/character/Knight.kt -------------------------------------------------------------------------------- /src/strategy/actiongame/character/Queen.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/strategy/actiongame/character/Queen.kt -------------------------------------------------------------------------------- /src/strategy/actiongame/character/Troll.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/strategy/actiongame/character/Troll.kt -------------------------------------------------------------------------------- /src/templatemethod/caffeinebeverage/BeverageTestDrive.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/templatemethod/caffeinebeverage/BeverageTestDrive.kt -------------------------------------------------------------------------------- /src/templatemethod/caffeinebeverage/beverages/CaffeineBeverage.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/templatemethod/caffeinebeverage/beverages/CaffeineBeverage.kt -------------------------------------------------------------------------------- /src/templatemethod/caffeinebeverage/beverages/Coffee.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/templatemethod/caffeinebeverage/beverages/Coffee.kt -------------------------------------------------------------------------------- /src/templatemethod/caffeinebeverage/beverages/Tea.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Devansh-Maurya/Design-Patterns-And-Principles/HEAD/src/templatemethod/caffeinebeverage/beverages/Tea.kt --------------------------------------------------------------------------------