Computer Science, asked by ayon43, 1 year ago

why class is known as object factory

Answers

Answered by rjshk1810
8
a) A class is called an object factory because objects are created from a class. An object is an instance of a class.

b)Whether a class contains a primitive data type or not has no bearing on whether or not it is considered a User-Defined Type. ... A very basic class can be thought of as a user defined type.

c)The creation of an instance is called instantiation. In class-based programming, objects are created from classes by subroutines called constructors, and destroyed by destructors. An object is an instance of a class, and may be called a class instance or class object; instantiation is then also known as construction.

d)Abstract classes allow you to provide default functionality for the subclasses.

e)A class is composed of instance variables which are of different data types. hence, a class can be viewed as a composite data type which is composed of primitive and other composite data types


Hope helped
Answered by rontirene
4

A class is known as an object factory because it produces similar objects like a factory.

Pls mark me the brainliest.

Similar questions