I have a Parent View class that contains a Parent Model. This parent model MUST be defined in the parent view. Also, each child view has its own corresponding extension of that parent model. I can assign the child model to the parent model in the child class, but every time I want to use a method defined in the child model, I have to type-cast it. How do I avoid this? Could I permanently type cast?
Asked
Active
Viewed 31 times
0
-
1This reminds me of [Parallel Inheritance Hierarchies](https://sourcemaking.com/refactoring/smells/parallel-inheritance-hierarchies). – jaco0646 Jul 20 '16 at 16:05
-
Thank you so much! I had no idea what it was called and it was a pain in the rear to search for on google! That is exactly my problem! – Cmoraski Jul 20 '16 at 16:13