Morgan Stanley Interview Question

Asked to code production level application in core java :D