MAQ Software Interview Question

basic oops. basic dbms. puzzles.