Create two classes named Mammals and MarineAnimals. Create another class named BlueWhale which inherits both the above classes. Now, create a function in each of these classes which prints "I am...


Create two classes named Mammals and MarineAnimals. Create another class named BlueWhale


which inherits both the above classes. Now, create a function in each of these classes which prints


"I am mammal", "I am a marine animal" and "I belong to both the categories: Mammals as well as


Marine Animals" respectively. Now, create an object for each of the above class and try calling


 function of Mammals by the object of Mammal


 function of BlueWhale by the object of BlueWhale


 function of each of its parent by the object of BlueWhale


 function of MarineAnimal by the object of MarineAnimal


B) Create two classes named Mammals and Marine Animals. Create another class named BlueWhale<br>which inherits both the above classes. Now, create a function in each of these classes which prints<br>

Extracted text: B) Create two classes named Mammals and Marine Animals. Create another class named BlueWhale which inherits both the above classes. Now, create a function in each of these classes which prints "I am mammal", "I am a marine animal" and "I belong to both the categories: Mammals as well as Marine Animals" respectively. Now, create an object for each of the above class and try calling function of Mammals by the object of Mammal function of BlueWhale by the object of BlueWhale function of each of its parent by the object of BlueWhale function of MarineAnimal by the object of MarineAnimal

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here