TIAA Interview Question

case study to solve with spring hibernate code