Download Michael Walters Computing 2007 - VLE
Transcript
47 The logic behind conducting this test is to compare the working of calculating the gross score by the system with some expected results in order to test how accurate the coded methods actually are. Test 1 2 3 Handicap Expected System Expected System 12.9 26.6 28.0 gross score 76 92 102 gross score 76 92 102 handicap 10.2 23.8 28.0 handicap 10.2 23.8 28.1 The course par is 72 for the cases above These test results confirmed that the application logic was coded correctly when calculating each players gross score. However, this was not the case initially because each calculated total did not allow for changes in the score data. The algorithm for this had to be amended so that every time a player scored over a double bogey (2 shots over par) on a hole their score needed to be reduced to this value. Following this the above results were produced, however there still exists a fault with test three. The system was intended to be implemented so that it only allowed handicaps up to 28.0 and as shown above an amended handicap has the value 28.1. A complete system would allow female players to obtain handicaps up to 36.0, however this wasn’t the intention of this solution because it would require a greater amount of application logic, and so this couldn’t be included especially with the project schedule being so strict. Therefore, in order to overcome this problem discovered in test three, the code was changed so that if a player has a handicap of 28.0 and they posted a score higher than this, then there would be no change to this value, because this is the maximum allowed. Net score calculation test This comparison is similar to the previous test however the handicap is taken from the gross score in order to produce a net value. This value produced by the application is then compared against an expected score as well as an expected handicap.