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

4. What do you mean by a prototype? Define analysis
prototype

Answer Posted / som shekhar

Prototype is creational design pattern similar to abstract
factory pattern.

Most of you know abstract factory pattern, in the prototype
pattern when you want to create a clone of an object of some
class, then instead of creating directly the clone that
means using new operator and step by step copying the
elements, or you will be calling the copy constructor of the
class.

But in the real time applications we dont want the copy
constructor to be called so it is made as private, and hence
you cannot copy the items, so this design patterns says that
if you want to create the clone of a class, keep the clone
fucntion as virtual in the base class and let the derived
class implement...this is one aspect.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the features of oop?

1150


What is the significance of classes in oop?

1132


Templates mean

2063


Why do we use encapsulation in oops?

1018


what's the basic's in dot net

2172


What is abstract class in oop?

994


What is difference between abstraction and encapsulation?

1064


What are the advantages of polymorphism?

1022


Why is abstraction needed?

1025


What is a class and object?

1037


How to use CMutex, CSemaphore in VC++ MFC

4772


How do you define social class?

1054


How do you achieve runtime polymorphism?

1040


What is an example of genetic polymorphism?

1165


What is difference between multiple inheritance and multilevel inheritance?

1134