White Box Basics Part 3 Complexity 1 HOMEWORK
White Box Basics – Part 3 Complexity – 1 HOMEWORK (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – Basics What did we learn so far ? We found out about Edges – Kanten Nodes – Knoten Cyclomatic Complexity – Zyklomatische Zahl (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY - Basics e = Edges n = Nodes (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY - Basics Cyclomatic Complexity Zyklomatische Zahl e–n+2 (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK : start if C 1 true then do P 1 if C 2 true then do P 3 else do P 4 endif else do P 2, P 5 endif if C 3 true then do P 6 else if C 4 true then do P 7 else do P 8, P 9 endif do P 10, P 11 endif : end 1. Draw a flowchart of this procedure (with the yes-branches to the left and the no-branches to the right) (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK 2. Convert the flowchart to a diagram like that Control Flow Graph 3. Calculate the Complexity 4. Calculate C 0 5. Calculate C 1 6. Calculate C 2 (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK : start if C 1 true then do P 1 if C 2 true then do P 3 else do P 4 endif else do P 2, P 5 endif if C 3 true then do P 6 else if C 4 true then do P 7 else do P 8, P 9 endif do P 10, P 11 endif : end (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK Calculate the Complexity (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK Calculate the Complexity 20 EDGES (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK Calculate the Complexity 20 EDGES 17 NODES (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK Calculate the Complexity 20 EDGES 17 NODES e-n+2 (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK Calculate the Complexity 20 EDGES 17 NODES e-n+2 20 -17+2=5 (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK Calculate C 0 (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK Calculate C 0 3 Cases give full Statement Coverage … and also full Branch Coverage ! (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK How come we need only 3 cases ? I’ts the SHAPE (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
COMPLEXITY – HOMEWORK Just by looking at this Shape I can tell you that we need 9 Cases for Path Coverage (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at
DR. WOLFGANG J. SCHNEIDER GMBH International Information Technology Consultants Professional Testing Solutions Telecommunications and Utility Billing Systems Euro Preparation for Companies in New EU Member Countries EDIFACT – DATANORM – ELDANORM – ETIM Interfaces Data Exchange with Banks and Credit Card Companies Total Quality Management – Good Manufacturing Practices IT Service Management - IT Infrastructure Library (ITIL) Knowledge Management Solutions IT Fitness for GAAP – IAS – FASB Balanced Scorecard Dr. Wolfgang J. Schneider - Start www. drschneider. at (c) Dr. Wolfgang J. Schneider 2003 - 2008 www. drschneider. at Take Advantage of 30+ Years of IT Experience !
- Slides: 17