Xero Interview Question

To give any comments on the code