Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain Factory pattern?

Answers were Sorted based on User's Feedback



Explain Factory pattern?..

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

Explain Factory pattern?..

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

Post New Answer

More ASP.NET Interview Questions

How to Page Execute in asp.net(inside browser)

1 Answers   Satyam, Wipro,


how to increase performance of web site? if there is a page with high load. the content is high then what should we do to increase performance?

3 Answers   Emphasis, Mphasis, TCS,


How would you turn off cookies on a page of a website?

0 Answers  


What is ispostback method in asp.net? Why do we use that?

0 Answers  


Can you explain what inheritance is and an example of when you might use it?

1 Answers   Sports Interactive,


How do you pass session values from one page to another ?

4 Answers   Digital GlobalSoft,


What are the namespaces used in asp.net mvc? : asp.net mvc

0 Answers  


what is view state

5 Answers   Microsoft, Siebel Systems,


What is the concepts of globalization and localization in .net?

0 Answers  


How to save Link of a Webpage in excel sheet?

1 Answers   HCL, NIIT,


In what order do the events of an ASPX page execute. As a developer, why is it important to understand these events?

5 Answers   Syntax Softtech, TCS,


What are type/key pairs in client script registration?

0 Answers  


Categories