Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started