Question
What is the main purpose of the constructor?
Answer: Option C
Was this answer helpful ?
The purpose of a constructor is to establish the class invariant. To do that, it often needs to
acquire system resources or in general perform an operation that may fail.
Was this answer helpful ?
Submit Solution