I hope this will help you understand why the answer is 4.
100% Decision coverage
The code traverses 4 paths/decisions for 100% Decision coverage.
This happens when the decision statements are nested. In this case
"height > width" with execute only if "width > length" is true.
"height > length" with execute only if &...
Statement coverage means every statement had to be executed.
Decision coverage measures the coverage of conditional branches. Branch coverage measures the coverage of conditional and unconditional branches. At 100 %, they give the same result. You can see a discussion on differences between these two here.
I added spaces so it's a bit more readable.
TDD , BDD , ADD etc are just overlapping terms with only few finner difference . These differences could still be important but not so much that you should break your head over it.
TDD: test-driven development:
Here we write the tests first and then build the software to make the tests pass.
eg: see the below unit test for the class simpleCalculator
TDD is primarily a development technique while BDD is a way to obtain a common understanding between business, development and test.
So, what I would give is an example of a purely technical test (i.e. some type of an unit test) that wouldn't necessarily be understandable from a purely business point of view.
I would probably answer something like this:
Personally I think BDD and TDD are nearly identical, just a slightly different way in uncovering and describing the details of the checks. Both models support the same types of checks or convince me otherwise.
BDD versus TDD. This test tool versus that test tool. Test-before
versus test-after versus this-works-...