SE1SA5 - Programming, Final Project (Card Game) Review
The usefulness of objects and classes when using a vast amount of repeated objects was made clear during the implementation and development of this program. The idea of ‘wrapping’ these classes into an easier to use format was greatly used. It allowed actions to be performed more easily, without the extensive use of pointers, along with making the code far more readable. This was especially helpful when it came to the debugging stage as it clarified all of the functions in comparison to the array of objects originally being used.
Only seeding srand() once throughout the code allowed successful generation of random numbers. Multiple misplaced calls to this would result in the same ‘random’ number being generated.
The importance of user testing also became clear as one user suggested that it would be a good idea to reveal the computer’s hand after the game had either been won or lost. This provided the user some form of satisfaction that they had either not been cheated or allowed to win.
Program flow control statements had to be used extensively in order to ensure that the program’s output and processing made sense and was correct. This taught a logical way of ensuring that calls to functions were in the correct places along with teaching methods that can be used to debug in situations where many functions are called to produce outputs.