Describe similarity between constructors and destructors


Problem:

Question 1- Which of the following is not a similarity between constructors and destructors?

a. Both can be called automatically.
b. Both have the same name as the class.
c. Both have no return type.
d. Both can be overloaded.

Question 2- Advantages of creating a class that inherits from another include all of the following except:

a. You save time because subclasses are created automatically from those that come built in as part of a programming language.
b. You save time because you need not re-create the fields and methods in the original class.
c. You reduce the chance of errors because the original class's methods have already been used and tested.
d. You make it easier for anyone who has used the original class to understand the new class.

Provide the correct answer and justification for your choice.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Describe similarity between constructors and destructors
Reference No:- TGS0893084

Expected delivery within 24 Hours