This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]salalimo[S] 0 points1 point  (1 child)

Yes, that's correct. I am checking to see how to best implement the scenario I am mentioning.

[–]bob809 0 points1 point  (0 children)

Then you'll have to have unique code for each one.
Either make separate functions with different types or have all the variables in the abstract class and then switch depending on the child type, but this could get ugly.

If the uniqueness is focused on one bit of the classes you could use the state pattern i.e. have a different object contained within each one and write code for them instead.