Structuring our program
In this section, we decide an overall structure for our program.
The development of large applications generally starts with recording the Software Requirement Specifications (SRS). This is generally followed by a graphical representation of constructs, such as the class, composition, inheritance, and the hiding of information using several modeling tools. These tools can be flow charts, unified modeling language (UML) tools, data flow diagrams, Venn diagrams (for database modeling), and so on.
These tools are very useful when the problem domain is not very clear. However, if you have ever played the game of chess, you should be very well acquainted with the problem domain. Furthermore, our chess program can be classified as a medium-sized program spanning a few hundred lines of code. Therefore, let's bypass these visual tools and get to the actual program design.
All of our previous projects have been structured as a single file. However, as programs grow in complexity...