How to pre­vent it

OpenSource For You - - DEVELOPERS -

A very sim­ple but harsh so­lu­tion is to make the base class ab­stract and dis­al­low ob­ject cre­ation. But this so­lu­tion might not be ap­pli­ca­ble in many in­stances where one has a need to in­stan­ti­ate the base class or when one has multi-level in­her­i­tance needs.

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.