Barclays interview question

java oops concepts and project