Rishi -
Son Le's second answer is correct !
If you run the following code
You'll get 4 rows and 5 columns of output.
Each row represents a type
Each column represents one of the tests
The correct
test will be true for B(ear) and false for all other types
The third column is the only column to produce this result.
I also think it's easier to do these problems when the classes are more like real life, so I made them into real-life inheritences - if you do that you can probably just work it out in your head.