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 |
WILL I GET A guaranteed JOB AFTER DOING bsc()IT) and GNIIT from an NIIT CENTRE??
21 Answers Biocon, MIT, NIIT,
Do you know about multiple inheritance?
Why is there no multiple inheritance?
Can destructor be overloaded?
20% of a 6 litre solution and 60% of 4 litre solution are mixed what the % of mixture of solution it is resulted into?
What is encapsulation in oop?
what is new modifier in C#
What is class and example?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
what is the use of mutable key word
Why is oop better than procedural?
What is deep and shalow copy?