So I have this professor who enjoys giving us assignments that are well out of the experience of everybody in my class. I am only just now reading through our book and another C++ book trying to catch myself up to the level shes teaching at thanks to me having a pretty terrible first professor who spent too much time teaching us his own shell code he made up as opposed to C++ like he was supposed to. Anyway, my assignment is to come up with 3 structural improvements that could be made to this program. And I have to explain why they are improvements. I dont even know where to begin because I couldnt even come up with this source code by myself if she asked me to, let alone tell her how to improve it. Im trying to teach myself the basics from scratch but I have to keep bouncing back and forth between teaching myself the simple stuff and having to do more complicated assignments.
All she said in the assignment description was to "identify three structural improvements (not comments or formatting) improvements that could be made to the program. Explain why these are improvements. Implement the improvements."
I mean I dont know how to improve a program that already outputs what this does. Because aside from doing that she just wants the pseudocode and full documentation. But as far as "improving" it im at a loss. Im sure there are probably ways to shorten it up but like I said Im only a beginner. I wouldnt know where to begin improving it.
heh, that's not too shabby ;P But yeah, you could lessen the number of cout lines by utilizing loop(s). Could add a new label feature -- labels to the left of the border with numbers 1-8 going upwards, and labels below the board A-H going left to right.
As for a third improvement... perhaps take all the board-drawing logic and move it into its own method? Then call that function from main() -- all these improvements should make main() itself super short (maybe 5 lines).