All Exams Test series for 1 year @ ₹349 only
Question

Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R 

Assertion A: Higher cyclomatic complexity indicates a more complex program. 

Reason R: It is calculated based on the number of independent execution path in the program. 

In the light of the above statements, choose the most appropriate answer from the options given below

The correct answer is
Both A and R are correct and R is the correct explanation of A

The question asks us to evaluate two statements, Assertion A and Reason R, related to cyclomatic complexity.

Analyzing Assertion A: Program Complexity

Assertion A states that higher cyclomatic complexity indicates a more complex program. This is correct. Cyclomatic complexity is a quantitative measure of the complexity of a program. A higher number generally suggests more control flow paths, making the code harder to test, understand, and maintain.

Analyzing Reason R: Calculation Basis

Reason R states that cyclomatic complexity is calculated based on the number of independent execution paths in the program. This is also correct. Cyclomatic complexity specifically measures the number of linearly independent paths through a program's source code. It's often calculated using control flow graphs.

Connecting Assertion A and Reason R

Since a higher number of independent execution paths (as stated in Reason R) directly leads to a more complex structure and thus a more complex program (as stated in Assertion A), Reason R provides the fundamental basis for Assertion A. Therefore, Reason R is a correct explanation of Assertion A.

Based on this analysis:

  • Assertion A is correct.
  • Reason R is correct.
  • Reason R is the correct explanation of Assertion A.

This aligns with Option A.

Was this answer helpful?

Important Questions from Design and Analysis

  1. Which of the following UML diagrams has a static view ?

  2. Software validation mainly checks for inconsistencies between

  3. To create an object-behavioral model, the analyst performs the following steps:

    (A) Evaluates all use-cases

    (B) Builds state transition diagram for the system.

    (C) Reviews the object behaviour model to verify accuracy and consistency

    (D) Identifies events that do not derive the interaction sequence.

    Choose the correct answer from the options given below:

  4. Which of the following statements is/are TRUE?

    P: In software engineering, defects that are discovered earlier are more expensive to fix

    Q: A software design is said to be a good design, if the components are strongly cohesive and weakly coupled

    Select the correct answer from the options given below:

  5. Coupling is a measure of the strength of the interconnections between software modules.

    Which of the following are correct statements with respect to module coupling?

    P: Common coupling occurs when one module controls the flow of another module by passing it information on what to do.

    Q: In data coupling, the complete data structure is passed from one module to another through parameters.

    R: Stamp coupling occurs when modules share a composite data structure and use only parts of it.

    Code:

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App