BAE Systems interview question

Simple coding exercise, and experience