ADP interview question

solve problems using OOPS concept and data structures