ANR Software interview question

Pattern program. Exception handling and inheritance