A review of the following pseudo code is to be performed using a checklist:
Module Vowel Counter
Message: array of Characters
M, N: Integer
ACount, ECount, ICount, OCount, UCount: Integer
BEGIN
I=1
Read Nextchar
While Nextchar <> 'S'
DO
Message (I) = Nextchar
I = I+1
Read Nextchar
ENDWHILE
FOR M = 1 To I
DO
Print (Message(M))
IF Message (M) = 'E'
THEN
ECount = ECount + 1
ELSE
IF Message (M) = 'A'
THEN
ACount = ACount + 1
ELSE
IF Message (M) = 'I'
THEN
ICount = ICount + 1
ELSE
IF Message (M) = 'O'
THEN
OCount = OCount + 1
ELSE
IF Message (M) = 'U'
THEN
UCount = UCount + 1
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDFOR
Print ('Message contains ' ACount + ECount + ICount + OCount + UCount ' vowels')
END
Which of the following checklist items would find code errors in this scenario?
A) Are all variables properly declared?
B) Are all loops, branches, and logic constructs complete, correct, and properly nested?
C) Are all cases covered in an IF-ELSEIF, including ELSE or DEFAULT clauses?
D) Are loop termination conditions obvious and invariably achievable?
E) Are there any redundant or unused variables?
A new web site has been launched for a testing conference. There are a number of links to other related web sites for information purposes. Participants like the new site but complaints are being made that some (not all) of the links to other sites do not work.
Which type of test tool is most appropriate in helping to identify the causes of these failures?
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 variable Cruise_Length (line 3) results in which type of data flow anomaly?
Which of the following best describes the reason why poorly written code is usually more difficult to maintain than well written code?
Below is the pseudo-code for the Win program:
The bingo program contains a data flow anomaly. Which data flow anomaly can be found in this program?
A unit test should be deterministic. Which option correctly describes the meaning of 'deterministic' as a characteristic of a unit test9
SELECT ONE OPTION
A project to replace your company's sales and merchandising system has begun. The old system is still in production but is poorly documented and expensive to maintain: changing it has often produced a large quantity of defects. The new version will be developed using modern techniques and technology.
Requirements include:
Loading sales data, sent electronically from the stores each evening, into a central database where it is then available for other applications.
Producing sales reports for the merchandisers, whose job is to manage stock levels in stores.
Predictions of future demand for each product, based on a combination of sales history and forecasting parameters.
Requirements 1 and 2 are satisfied by the existing system and will be rewritten with no significant changes. Requirement 3 is new: these forecasting reports will be run overnight, and users will request them by entering simple parameters online during the day.
The sales data are loaded in an overnight batch run. There have been problems at peak periods when this run has taken longer than scheduled, so that dependent jobs could not finish before the start of the working day.
As a Technical Test Analyst, you have been asked to contribute to the project's Master Test Plan. The concerns expressed by stakeholders during risk identification include the length of the batch job runs, ease of parameter entry for the users, unauthorized access to stored sales data, and limited time for testing. With these in mind, which TWO of the following quality characteristics sub-characteristics are likely to contain the highest levels of technical risk?
A) Operability.
B) Time behavior.
C) Interoperability.
D) Security.
E) Testability.
Consider the following pseudocode segment:
set a = 1
while a < 12
display “this is loop", a
if a > 10 then
display "loop is > 10’
set a = 5
else
display “loop is < 11*
endif
end while
display “Final value of a is", a
Which of the following issues should be detected in the code review?
You are working on project where re-use of software is an objective. You are involved in the project as a Technical Test Analyst and have been given the task to develop a checklist for code reviews.
Which question from the list below should you implement as part of the code review checklist?
You have identified existing test cases that require re-factoring, Which is the NEXT task you should perform?
SELECT ONE OPTION