Pergunta de entrevista da empresa Johnson Controls

Different types of inheritance and explain it with code?