Question: Draw all flow graphs (not a flowchart) for every module and calculate 1.The cyclomatic complexity, v(G) , 2. Essential complexity, ev(G) , 3.Module design complexity,

Draw all flow graphs (not a flowchart) for every module and calculate

1.The cyclomatic complexity, v(G),

2. Essential complexity, ev(G),

3.Module design complexity, iv(G),

4. System design complexity, S0, and

5. Integration complexity, S1

for the software code below.

(Please explain all subquestion answers in detail.)

PROGRAM gelmn

c

Gauss elimination method to solve a linear system of eqns

dimension a(30,30),x(30)

write(*,10)

10

format(1x,'To solve a linear system of equations using Gauss ',\)

write(*,20)

format(1x,'To solve a linear system of equations using Gauss ',\)

20

format(1x,'Elimination method with pivoting(using subroutine).')

write(*,*)'Enter the number of variables:'

read(*,*)n

write(*,*)'Enter the coefficients in the equations:'

read(*,*)((a(i,j),j=1,n+1),i=1,n)

DO 30 k=1,n-1

call pivot(a,k,n)

DO 90 i=k+1,n

u=a(i,k)/a(k,k)

DO 100 j=k,n+1

a(i,j)=a(i,j)-u*a(k,j)

100

continue

90

continue

30

continue

IF(abs(a(n,n)).LE.(.00001))THEN

write(*,*)'Ill conditioned equations.'

STOP

ENDIF

x(n)=a(n,n+1)/a(n,n)

DO 60 i=n-1,1,-1

sum=0

DO 70 j=i+1,n

sum=sum+a(i,j)*x(j)

70

continue

x(i)=(a(i,n+1)-sum)/a(i,i)

60

continue

write(*,*)'Values of the variables are as follows:'

DO 80 i=1,n

write(*,110)x(i)

110

format(1x,F10.3)

80

continue

STOP

END

subroutine pivot(a,k,n)

dimension a(30,30)

real mx

integer p,q

mx=abs(a(k,k))

p=k

DO 40 m=k+1,n

IF(abs(a(m,k)).GT.mx)THEN

mx=abs(a(m,k))

p=m

ENDIF

40

continue

IF(mx.LE.(.00001))THEN

write(*,*)'Ill-conditioned equations.'

STOP

ENDIF

DO 50 q=k,n+1

temp=a(k,q)

a(k,q)=a(p,q)

a(p,q)=temp

50

continue

return

END

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!