One of the first design patterns you will encounter, and maybe you have already implemented it without knowing, is the factory method pattern. As I am recently going through Refactoring Guru to pay…