I added a file that corresponds to what I was trying to achieve in the begining. Working with the strategy object of Abs type from inside the B class