Object-oriented is a development-oriented system that takes various measures to prevent the occurrence of bugs that are difficult to track during system development, maintenance, and expansion.
The java design pattern aims to create a system that is easy to extend and maintain by increasing the reusability of classes.
Below is the unfinished Menu
Menu Iterator Adapter Template Method Factory Method Singleton Prototype Builder Abstract Factory Bridge Strategy Composite Decorator Visitor Chain of Responsibility Facade Mediator Observer Memento *State Flyweight Proxy Command *Interpreter
Dilute the dependencies between objects
・ Be aware of abstract classes and interface programming ・ Expand the class that works correctly without modifying it. ・ Be aware of The Liskov Substitution Principle (LSP) Use Super class type variables to handle subclasses collectively Be aware if you want to use instanceof (Can you do it with Lsp instead of instanceof?)
Recommended Posts