Currently, Model-Driven Engineering (MDE) is considered one of the most promising approaches for software development. In this paper, a simple but complete example based on state-machines will be used to demonstrate the benefits of this approach. After defining a modelling language (meta-model) for statemachines, a graphical tool will be presented which is aimed at easing the description and validation of state-machine models. These models will then be used as inputs for another tool which will automatically generate the corresponding Ada code, including a simulation program to test the correctness and performance of the implemented application.