Thursday 17 March 2011

Class Modelling

System modelling is something that students often find difficult to do. One possible reason for this is that they have difficulty mapping the models to a framework that can be used to validate their design, i.e. what does the model do? Whilst modelling should be more abstract than programming in pictures, I think that grounding the models in an implementation language, at least initially, is a good place to start.

To that end, a while ago I produced and delivered some material that linked class modelling with Java implementations.This was quite well received and can be downloaded as a zip file. The application is a small hotel booking system whose model is shown on the right. The material includes the Java code (as an Eclipse project) of a basic booking system, some slides, some student activities to extend the models and implementation, and the solutions. The models contained in the material were created using the open-source modelling tool called StarUML.

A nice feature of the implementation is that it can print out the state ofthe booking system as an XML document. This means that students can understand state changes in terms of pre and post-states of the system. A natural extension of the material would be to introduce pre and post conditions that can be articulated in terms of the XML system states.

No comments:

Post a Comment