I am looking for a design pattern where it fits these specs:
1- Say you have a package animal including 'Animal', 'Cat' and 'Dog'.
2- You have to modify a method behaviour in 'Animal' (also overridden in 'Cat' and 'Dog' as in the package) without doing any modification in the package animal source code.
I did find Visitor Pattern for this kind of purpose, but the problem with that you have to modify package animal source code with 'implement'ing a Visitable interface including accept method. However, this is not allowed.
What do you suggest?