What is a constructor? Explain the difference between a default constructor and a parameterized constructor.

What will be an ideal response?

A constructor is a class method, always named New, whose sole purpose is to initialize the class's Private variables. Constructors never return a value, so they are always Sub procedures and not Function procedures. A default constructor is a constructor that has no parameters. A parameterized constructor contains one or more parameters.

Computer Science & Information Technology

You might also like to view...

Why cannot the link based implementation of the ADT List use a compiler generated copy constructor?

What will be an ideal response?

Computer Science & Information Technology

The data dictionary:

The data dictionary: a. Designates the data type of each piece of data used in the solution. b. Designates any pseudonyms of each piece of data. c. Designates the scope of the data. d. All of the above. e. None of the above.

Computer Science & Information Technology