Computer Science, asked by nisasardar, 3 months ago

what is hierarchical inheritance with example ?​

Answers

Answered by tanvi1307
1

Answer:

If more than one class is inherited from the base class, it's known as hierarchical inheritance. In hierarchical inheritance, all features that are common in child classes are included in the base class. For example: Physics, Chemistry, Biology are derived from Science class

Answered by Anonymous
4

ɪꜰ ᴍᴏʀᴇ ᴛʜᴀɴ ᴏɴᴇ ᴄʟᴀꜱꜱ ɪꜱ ɪɴʜᴇʀɪᴛᴇᴅ ꜰʀᴏᴍ ᴛʜᴇ ʙᴀꜱᴇ ᴄʟᴀꜱꜱ, ɪᴛ'ꜱ ᴋɴᴏᴡɴ ᴀꜱ ʜɪᴇʀᴀʀᴄʜɪᴄᴀʟ ɪɴʜᴇʀɪᴛᴀɴᴄᴇ. ɪɴ ʜɪᴇʀᴀʀᴄʜɪᴄᴀʟ ɪɴʜᴇʀɪᴛᴀɴᴄᴇ, ᴀʟʟ ꜰᴇᴀᴛᴜʀᴇꜱ ᴛʜᴀᴛ ᴀʀᴇ ᴄᴏᴍᴍᴏɴ ɪɴ ᴄʜɪʟᴅ ᴄʟᴀꜱꜱᴇꜱ ᴀʀᴇ ɪɴᴄʟᴜᴅᴇᴅ ɪɴ ᴛʜᴇ ʙᴀꜱᴇ ᴄʟᴀꜱꜱ. ꜰᴏʀ ᴇxᴀᴍᴘʟᴇ: ᴘʜʏꜱɪᴄꜱ, ᴄʜᴇᴍɪꜱᴛʀʏ, ʙɪᴏʟᴏɢʏ ᴀʀᴇ ᴅᴇʀɪᴠᴇᴅ ꜰʀᴏᴍ ꜱᴄɪᴇɴᴄᴇ ᴄʟᴀꜱꜱ.

Similar questions