I though I was ok with POO, but right now I'm all confused with the following.

---

Basic model
-----------

For instance, let's say you've created `Dog` and `Cat` objects that extends the abstract class `Animal`.

`abstract Animal` has the generic properties:

* color: string
* legs: number

`Cat extends Animal` has the extra property:

* humansTolerance: number

`Dog extends Animal` has the extra property:

* ballsRetrieved: number

---

Problem
-------

Now, I want to display a list of all the animals on my application in a generic way. Simple, the application just pulls all the Animal objects from the database, puts them in a nice `List<Animal>` with each object instantiated with its proper class.

But now, when I click on one given animal, I want to be able to display the `Animal` generic properties AND the properties that are specific to its type.

For example, If the selected animal is a cat, I want the UI to show the generic animal properties `color` and `legs`, but I also want to display the cat property `humansTolerance`. Same goes for the dog with `ballsRetrieved`.

---

Question
--------

Am I supposed to use the often called infamous `instanceof` / `typeof` to do that? How can I make the UI display various elements depending on the type of the object?