Bank of America Interview Question

some oop, was quite easy