A new system is being built to handle the message handling of financial transactions - this system is critical to the organization's finances. The code includes loops and decisions with several multiple conditions. The nature of the system means that tests are quite time-consuming to execute. Which of the following would be the BEST white box testing option for the new software?
Below is pseudo-code which calculates a customer's cruise credits based on past cruise history: PROGRAM CALC CRUISE CREDITS (CUST_ID) COUNT_CRUISES, CRUISE_CREDITS, LOYALTY_RATING: INTEGER CRUISE_LENGTH, CRUISE_ACCOM_TYPE: VAR LOYALTY_RATING = 0 COUNT_CRUISES = 0 CRUISE_LENGTH = 0 CRUISE_ACCOM_TYPE = 0 BEGIN READ CUSTOMER'S CRUISE HISTORY TO OBTAIN COUNT OF CRUISES READ CRUISE_HISTORY (CUST_ID) WHILE COUNT_CRUISES != -1 DO READ CUSTOMER'S NEXT CRUISE READ NEXT_CRUISE IF CRUISE_ACCOM_TYPE = 3 THEN CRUISE_CREDITS = CRUISE_CREDITS + 5 ELSE IF CRUISE_ACCOM_TYPE = 2 THEN CRUISE_CREDITS = CRUISE_CREDITS + 3 ELSE CRUISE_CREDITS = CRUISE_CREDITS + 2 ENDIF ENDIF COUNT_CRUISES = COUNT_CRUISES - 1 ENDWHILE LOYALTY_RATING = CRUISE_CREDITS / COUNT_CRUISES WRITE ("CRUISE CREDIT TOTAL IS:") WRITE (CRUISE_CREDITS) END PROGRAM CALC CRUISE CREDITS The code contains data flow anomalies on lines 14 and 27. Which examples of data flow anomalies can be found on these lines?
© Copyrights DumpsEngine 2026. All Rights Reserved
We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the DumpsEngine.
