Computer Science, asked by Chakshu290703, 1 year ago

Why is :
a. Class known as object factory
b. Class is user defined data type
c. Object is an instance of a class
d. Class as an abstraction
e. Class is composite data type
Write briefly(at least 2-3 lines each).

Answers

Answered by Achuz5
69
hYy

Here is the answer

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


Chakshu290703: Thnx
Answered by StaceeLichtenstein
9

The explanation of this question is given below

Explanation:

a Class known as object factory because the user will created the object withe the help of class without the class the user will never create the object of the class

b class is user defined data type because we create the class as our need or the program  we can use that class into the another class

c  Object is an instance of a class because we created the object for accessing the member function of a class when we create a object of class there is always memory is allocated and default constructor is created when we destroy the class the constructor is deal-located i,e destructor.

d  Class as an abstraction means that only essential details gives it do not gives internal implementation also it gives the default functionality for the subclasses.

e The class consists of the instance or object variables that are of various types of data the class therefore be perceived as a composite data type consisting of the primitive as well as other composite data types

Learn More :

  • brainly.in/question/4826340
Similar questions