Moody's Interview Question

Basic oops and dbms questions