Crete base class 'Automat' and two derived class