Teradata interview question

Basic OOP and code writing.