Thank you for your answer.
Yes that is exactly what I want but I would like to implement it as a neural network. At this stadium it would not make much sense, since it will be a prototype for future use. Later I want to do multiple classifications on different levels, so i thought of a simple task to get started with the problem. And that is why I try to generalize subclasses.
Is there any way to solve it at this way?