J.P. Morgan interview question

Java streams, solid principles and more