Morgan Stanley interview question

medium level java, design pattern and solid principals