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

They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1931


What is abstraction in oop?

1138


What is a class and object?

1055


How do you define social class?

1069


How oops is better than procedural?

1100


What is object in oop?

1119


What language is oop?

1011


What is the main feature of oop?

1151


What are the advantages of polymorphism?

1033


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

2320


What is abstract class in oop?

1014


What is the difference between inheritance and polymorphism?

1114


write a C++ program for booking using constructor and destructor.

2544


What is the real time example of encapsulation?

1070


What does and I oop and sksksk mean?

1162