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 the different authentication modes in asp.net?
In order to bind the data from a data source to the Repeater control what property is set and what method must you call in your code,?
how can we display records in single datagrid using two datasets in different place?
2 Answers Global Computer, Honeywell,
What is role manager work in web.config? how to restrict perticular pages from the users using the role manager?
Explain the main function of razor in asp.net? : asp.net mvc
Explain what a diffgram is and a good use for one?
1 Answers Siebel Systems, Syntax Softtech,
Difference between DataView and DataTable
what is manifest?
i develop a web application and i gave security setting i.e autherization and athentication now it work properly on my local system , now question is ,is this security setting ie autherization and athentication which i gave in web.config will it be enough strong to secure my application on internet or i have to use some 3rd party tool or software to get security .if yes --how ? if no--what is the alternate?
How to compare two strings with out Case sensitive ?
Difference between Active Exe and Activex dll ?
which is better arraylist or dictionary?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)