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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started