All of the Creational patterns deal with ways to create instance of objects. Your program should not depend on how objects are created and arranged.
In Java, we can create an object by using student = new Student();'
Doing this really amounts to hard coding, depending on how you create the object within your program.
This allows us to write methods that can create different objects and that can be extended to create other newly-developed objects, all without modifying the method's code!
Problem statement for Simple Factory Pattern: You need to create
Solution:

0 comments:
Post a Comment