Why is class called a factory of a object
Answers
Answered by
2
A class is called an object factory because objects are created from a class. An object is an instance of a class. ... In class-based programming, objects are created from classes by subroutines called constructors, and destroyed by destructors.
Answered by
1
Answer:
Because with a class you can create many objects without writing much code. Like in a factory, objects can be mass-produced.
Similar questions
Hindi,
4 months ago
Social Sciences,
4 months ago
History,
9 months ago
Math,
9 months ago
Chemistry,
1 year ago