Close
Close Window

ITSC2214 Data Structures and Algorithms V6 (2022F)

Chapter 1 Object-oriented Programming Tutorials

Show Source |    | About   «  1.6. Testing for Code Coverage   ::   Contents   ::   1.8. Bowling Example  »

1.7. Another Example

1.7.1. Another Example

Here is another example to let you practice testing. This is testing a bowling game. Each frame starts with 10 pins, the user enters the number of pins hit by each roll of the ball. Hitting all 10 points with one roll is a strike. Knocking down all 10 points on two rolls is a spare.

Try to get at least 75% code coverage.

   «  1.6. Testing for Code Coverage   ::   Contents   ::   1.8. Bowling Example  »

nsf
Close Window