TIAA interview question

case study to solve with spring hibernate code