Computer Science, asked by aaahaaaa, 11 months ago

Why class is called an object factory?​

Answers

Answered by sushmita1750
124

Hey Mate ❤

Here is ur answer....

A class is an blue print from which each individual objects are created. All the objects inside class have same characteristics and behaviour that is data and functioning. Thus a class is called an object factory...

Hope the answer helps...Plzz drop a thnkss...

Answered by cyrusbishop
20

Answer:

The term factory typically is used for holding similar kind of objects within it. Generally, an object is created by using information available in the class. It also contains details of an object's internal data and when an object is brought into existence, it is called instantiation.  

Thus, we can conclude that class is a prototype of an object. Each object belonging to a specific class possesses the data and the methods defined within the class.

It produces objects of similar type. Hence, it is termed as object factory.



Similar questions