The main aim is to create a multi-class program, to practice design, classes, objects, libraries, unit testing, and style. Please provide short comments on the code so I can understand where these have been achieved. I will need either of these additions to the program (please also explain how it is achieved in a .txt or commented in the code):
The idea is to write a program called Oxo.java which allows two people to play the game Noughts and Crosses (or Tic-Tac-Toe if you are American) using just text. It would be reasonably easy to write this program in one piece, but you are asked to deliberately over-engineer it, as if it were a bigger project, to show off your object oriented skills. Here are some suggested classes:
A board might be printed out like this (or something similar which indicates row letters and column numbers):
The two players might use the same keyboard to type in moves:
Player O's move: b2
Some things you might like to know, and which might be helpful, are:
Some things which I am looking for are: good design (probably along the lines I have suggested, but in any case with "the right code in the right place"), good style (DRY, consistent, commented but not over-commented code), no statics (except for main methods), private fields (except maybe for immutable objects), defensive programming (i.e. testing for bad things even though they shouldn't happen, to improve debugging), unit testing (to convince me that your classes do what they should), robustness (to convince me that your classes don't do what they shouldn't).