User Stories, Use Cases And Accepatance Tests

Read Complete Research Material

USER STORIES, USE CASES AND ACCEPATANCE TESTS

User Stories, Use Cases and Acceptance Tests



User Stories, Use Cases and Acceptance Tests

Step 1: we name all the bag of gold coins as #1, #2, #3......#8, #9, and #10

Step 2: we put 1 coin from bag #1, 2 coins from bag #2, 3 coins from bag #3.........8 coins from bag #8, 9 coins from bag #9, and 10 coins from bag 10 onto the scale. Find out the total weight.

Step 3: the total weight should have been 10 grams X (1+2+3+4+5+6+7+8+9+10=55) = 550 grams if all coins are the same (10grams each).

Step 4: Subtract the total of step 2 from total of step 3.

Conclusion: If step 4 results 1 gram, then bag #1 is the low quality coins, if step 4 results 2 grams, then bag #2 is the one, if step 4 results 3 grams, then bag #3 is the one.......etc.

It certainly looks as if a million dollars is more than all those pennies added up, because each penny is worth so little. If we think carefully about this problem, however, we will find a surprising answer. To begin, let's look at what happens in the first five days and see if we can find a pattern (Brown, 2012, pp.12-15).

Day No.of Pennies Given Total No.of Pennies

1 1 1

2 1 x 2 = 2 1+2 = 3

3 2 x 2 = 4 1+2+4 = 7

4 4 x 2 = 8 1+2+4+8 = 15

5 8 x 2 = 16 1+2+4+8+16 = 31

We see that the series whose sum gives the total number of pennies follows a regular pattern: each new term added to it is a power of two. This is an example of a geometric series. A geometric series is defined as having a constant ratio between consecutive terms. In our case, we are told that the number of pennies given each day is double the number given the day before, which suggests that the ratio of this series is 2:

no. pennies given on second day 2

------------------------------- = --- = 2

no. pennies given on first day 1

no. pennies given on third day 4

------------------------------- = --- = 2

no. pennies given on second day 2

no. pennies given on fourth day 8

------------------------------- = --- = 2

no. pennies given on third day 4

Indeed, the ratio of the geometric series that gives the total number of pennies on a particular day is 2. Having found this ratio, we can now use ...