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...

In what situation factory design patterns,DAO design
patterns,singleton design patterns should be applied.?

Answer Posted / monica

Use Factory Design Pattern when
- a class cannot anticipate the class of objects it must
create
- a class wants its subclasses to specify the objects it
creates
- classes delegate the responsibility to one of several
helper subclasses and you want to knowledge of which helper
subclass is the delegate.

Use Singleton Pattern when
- there must be one instance of a class and it must be
accessible to clients from well known access point.
-the sole instance should be extensible by subclassing, and
client should be able to use an extended instance without
modifying their code.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism and why is it important?

981


What is polymorphism and example?

980


can inline function declare in private part of class?

4303


What is meant by multiple inheritance?

1180


What is new keyword in oops?

993


Write a program to sort the number with different sorts in one program ??

2324


How oops is better than procedural?

1027


Prepare me a program for the animation of train

2412


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6621


Is oop better than procedural?

976


What is pointer in oop?

969


What does no cap mean?

1008


What is basic concept of oop?

1105


What is object in oop with example?

1177


write string class as your own class in java without using any built-in function

2443