Question: Using the pseudocode below: 1. Draw the flow graph representation. 2. Label its regions and calculate the Cyclomatic Complexity, V(G) of your program using three

Using the pseudocode below:

1. Draw the flow graph representation.

2. Label its regions and calculate the Cyclomatic Complexity, V(G) of your program using three methods.

START

Read TOTEMP

IF TOTEMP <= 0

Write No Employees to process.

ELSE

COUNT = 0

TOTALPAY = 0

TOTALREGPAY = 0

TOTALOTPAY = 0

DOWHILE COUNT < TOTEMP

Read NAME, SSN, HOURS, RATE

IF HOURS > 40

REGPAY = 40 * RATE

OTPAY = (HOURS 40) * (1.5 * RATE)

PAY = REGPAY + OTPAY

TOTALREGPAY = TOTALREGPAY + REGPAY

TOTALOTPAY = TOTALOTPAY + OTPAY

ELSE

PAY = HOURS * RATE

TOTALREGPAY = TOTALREGPAY + PAY

ENDIF

TOTALPAY = TOTALPAY + PAY

Write NAME, SSN, PAY

COUNT = COUNT + 1

ENDDO

Write TOTREGPAY, TOTALOTPAY, TOTALPAY

ENDIF

STOP

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!