Here is how I would attack a problem like this.

First consider the structure of the program. I love uml, so I nearly always make uml models before starting on implementation. (Google uml if you...