Explain Factory pattern?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / gaurav
For better answer :
http://planetofcoders.blogspot.com/2011/10/can-you-explain-factory-pattern.html
Is This Answer Correct ? | 1 Yes | 0 No |
What are Master pages? How to define a Master page?
What is viewstate? What does the "enableviewstate” property do? Whay would I want it on or off?
What are uri parameters?
what are types of viewstate
What is advantage of code behind coding in ASP.NET?
0 Answers Sans Pareil IT Services,
Define tracing.
How ASP.NET page works?
Explain the various authentication mechanisms in asp.net.
How do session tokens work?
What are Http handler ?
6 Answers Accenture, BirlaSoft, Satyam, Syntel,
What are the different types of Caching techniques in ASP.NET?
What does asax stand for?