Teaching Semantic Aspects of OO Programming
Martin Blom, Eivind J Nordby, Anna Brunström · 2002
One important aspect when teaching OO technology is the semantics of programming. Much time is traditionally spent on syntax and language mechanisms whereas the semantics is given less time. To remedy this problem, we try to introduce a semantic thinking throughout the entire computer science education. We have developed a contract-based programming method to enforce the semantic aspects and have performed course experiments to see what advantages such a method can have on the students' abilities. This paper presents the method and an experiment performed in a course on project work and Java to compare the method to a standard programming method. The contract-based method was positively received from the students who reported that working with the method felt natural. The results of the experiment show that the work satisfaction is slightly higher when using this contract-based method. They also show that there is a gain in the time spent on the assignment when the contract-based method is used. The long-term educational e#ects of the method are currently under investigation. 1