Xero interview question

To give any comments on the code