Which of the following is an example of multiple inheritance?
a. Macintosh and IBM PC are both types of PCs
b. a computer can be a mainframe or a PC
c. a PC can be a desktop or a laptop
d. a laptop is both a PC and a portable device
e. a portable device is a lightweight device

Respuesta :

ijeggs

Answer:

D) A laptop is both a PC and a portable device

Explanation:

In Object oriented programming multiple inheritance refers to a class or the object of a class inheriting multiple characteristics from more than one parent class. Bringing this idea to the scenario in this question, we see that a laptop shares several common characteristics and features of a PC as well as  portable devices so this can be seen as an example of multiple inheritance.

ACCESS MORE