Exercise Probability
(Chapter 17)
Again we are doing the individual work first.
Individual work”
As you finish each question, let others know.  When the last person in the group has answered the first question, take a break, and compare notes with the others. Repeat with the other questions.

Remember the calculator program discussed earlier?
(Exercise Unit Testing and Exercise Automatic Testing)

The calculator is actually customizeable.
That is, you can have statistical functions, or not.
You can have memory functions, or not.
You can have geometric functions, or not.
And you can have debug printing statements, or not.
(All versions have the algebraic functions.)

The program is basically the same. It is mainly customized by having, or not having, buttons on the web page.
[Assume you can customize the web page by commenting out rows]

The program has flags: Stat, Memory, Geo, Debug.
If the Stat, Memory, or Geo flags are on, the appropriate statistical, memory, geometric functions work.
(Otherwise, they are ignored.)
If the Debug flag is on, it prints out current value, top of stack, etc. while running.

So, in principle, there are 16 possible calculators; corresponding to the 16 combinations possible for the flags.
Assume you have test data to specifically focus on memory, geometric, and statistical functions.
(also, you have a general algebraic test data set.)

Your supervisor tells you that since the web page won't call one of the functions not included in a given version of the calculator, there is no need to have the flags : Stat, Memory, Geo.
So you are to debug the program while all three of those flags are kept ON. He says this is less work for you.

Tell your supervisor what you think about only debugging the full calculator with all three flags on. 

Your supervisor gets why you want the Debug flag on.  It is OK with him to do all the debugging with that flag on.  Then, when it works, turn the flag off, and ship it.  That will work, right?

Tell your supervisor what you think about only debugging the full calculator with the Debug flag on. 

Your supervisor's boss, has overruled him.  Since there are 16 possible calculators, you are going to have to do 16 different debug runs.  (Aren't you glad you understand automated testing?)
To save work, he says, just run ALL the test data sets for each of the 16 computers.

Tell the boss what you think of this plan.  If you do not want to debug 16 different calculators, how should you go about it?

Group work:
See if you can come up with a consensus answer to all the answers.