CG Infinity interview question

every thing was easy just basic OOPS concepts and last project