ITPEC FE Subject A April 2026 Question 8
Which of the following is the appropriate description of constructors in Object-Oriented Programming (OOP)?
Explanation
Constructors initialize objects — in class-based OOP the constructor runs as part of creating an instance and puts it into a valid initial state.
When an object is created, storage is allocated and then the constructor runs: it assigns initial field values, checks arguments and acquires resources. Only after it returns is the object ready for use.
Answer (c)
Why not others:
- •(a) — reverses the order: the constructor runs during instantiation, and the object is not fully instantiated until it finishes
- •(b) — contradicts the definition; initialization is exactly the constructor's role
- •(d) — in languages such as Java and C++ constructors are not inherited like regular methods; a subclass declares its own and calls the parent's explicitly (for example with
super()...)
Key rule: Allocation creates the storage and the constructor makes it usable; constructors belong to their own class and are chained, not inherited.
Algorithm and Programming · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.