Question: Suppose we have a base class Carnivore. BigCat and Bear are derived classes of Carnivore. Leopard, Lion. and Tiger are derived classes of BigCat. BrownBear
Suppose we have a base class Carnivore. BigCat and Bear are derived classes of Carnivore. Leopard, Lion. and Tiger are derived classes of BigCat. BrownBear and IceBear are derived classes of Bear.
aDraw a simple diagram showing the inheritance relationships remember to draw arrow directions: bName ALL of the types ofa Tiger object: cIn some classEinfhrungsmodul Computerlinguistik Datenstrukturen und Algorithmen fr die Computerlinguistik I
Question points
Suppose we have a base class Carnivore. BigCat and Bear are derived classes of
Carnivore. Leopard, Lion, and Tiger are derived classes of BigCat. BrownBear
and IceBear are derived classes of Bear.
a Draw a simple diagram showing the inheritance relationships remember to draw
arrow directions:
b Name ALL of the types of a Tiger object:
c In some class, I have defined the method:
public static void myMethodBear b
this method does something, but it doesn't matter what
Name all of the object types that can be used as arguments to myMethod:
d The class definition of Leopard begins with:
public class Leopard extends, Ihave defined the method:
public static void myMethodBear b Name all of the object types lhat can be used as arguments to myMethod
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
