Trying build architecture of task with help of the patterns "Strategy" and "Factory"