Caterpillar interview question

Simple basic questions in digital electronics and oops concepts