Abstract: Object-oriented programming is a wonderful way to
make programming of huge real life tasks much easier than by using
procedural languages. In order to teach those ideas to students, it
is important to find a good task that shows the advantages of OOprogramming
very naturally. This paper gives an example, the game
Battleship, which seems to work excellent for teaching the OO ideas
(using Java, [1], [2], [3], [4]).
A three-step task is presented for how to teach OO-programming
using just one example suitable to convey many of the OO ideas.
Observations are given at the end and conclusions about how the
whole teaching course worked out.