Answer Posted / swetha
Factory Design Pattern is a simple decision making class
that returns one of several objects depending on the data
provided. It comes under creational type of design pattern.
Example:
Suppose say that want to write the code to perform
arithmetic calculations. Initially you decided to write code
for only Addition and Subtraction. And later on you decided
to add more functionality by including Multiplication and
Division. Now, if you don't use Factory Design Pattern, we
need to change the entire code to include additional
functionality. But, when we use Factory Design Pattern, It
is easy to add additional functionality when needed without
disturbing previous code.
In factory class we create the instance of the classes
addition, subtraction, division and multiplication based on
the operator selected.
In this way Factory Design Pattern is useful.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Where sessions are stored?
Which is better asp.net or php?
What is a runtime version?
when a request is made in Life cycle of ASP.NET page .
Is post back property in asp net?
What is server side routing?
Why session is necessary in web application?
What is the state management in asp.net?
if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....
What is the differences between a primary key and a unique key in sql server?
Why do we need Sessions?
What is application in asp net?
How do u deploy your asp.net application?
How is a session stored and maintained in asp.net?
What are session and cookies?