CS FundamentalsHardIBM · Deloitte pattern
A program's control flow graph has 6 edges, 5 nodes and 1 connected component. According to McCabe's basis path method, what is the minimum number of test cases needed to execute every independent path at least once?
- A. 2
- B. 6
- C. 3
- D. 4
Correct answer: C. 3
The size of the basis set of independent paths equals the cyclomatic complexity: V(G) = E − N + 2P = 6 − 5 + 2(1) = 3. That many test cases form a minimal basis set.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A program's control flow graph has 8 edges, 6 nodes and 1 connected component. According to McCabe's basis path method, what is the…
- A Scrum team's last 3 sprints delivered 24, 28, 26 story points. 234 points remain in the backlog and sprints are 2 weeks long. Using…
- A Scrum team's last 4 sprints delivered 18, 22, 20, 24 story points. 168 points remain in the backlog and sprints are 2 weeks long. Using…
- A Scrum team's last 3 sprints delivered 35, 40, 30 story points. 315 points remain in the backlog and sprints are 3 weeks long. Using…
- A Scrum team's last 3 sprints delivered 15, 18, 21 story points. 108 points remain in the backlog and sprints are 2 weeks long. Using…
- A Scrum team's last 4 sprints delivered 50, 45, 55, 40 story points. 380 points remain in the backlog and sprints are 1 week long. Using…