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



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

Answer / 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

More OOPS Interview Questions

if u write a class do u write Assignment operator and copy constructor

1 Answers   Siemens,


can you give the dynamic polymorphism types?

2 Answers   Wipro,


20% of a 6 litre solution and 60% of 4 litre solution are mixed what the % of mixture of solution it is resulted into?

5 Answers   IonIdea,


What are benefits of oop?

0 Answers  


We have a scale and 7 balls. 1 ball is heavier than all the rest. How to determine the heaviest ball with only 3 possible weighing attempts?

8 Answers   IBM, Sage, Vertex,






What are functions in oop?

0 Answers  


What is polymorphism in oops with example?

0 Answers  


who is the father of OPPS

4 Answers   Infosys, TCS,


What is encapsulation oop?

0 Answers  


What do you mean by public, private, protected and friendly?

3 Answers   CA,


Which keyword is written to use a variable declared in one class in the other class?

5 Answers   TCS,


write a progra in c++ using class & object to find out wheather a given no. is prim or not.

2 Answers  


Categories