Consider the following section of pseudocode:
function getPassword() {
var x;
var y;
var z;
var passwordGood = false
// Get password from user, user is allowed 3 tries
do until x = 3
call getPassword (password)
if password is good
x = 3
passwordGood = true
else
X = X + 1
display ''Password is not valid, try again''
endif
If passwordGood <> true
display ''You exceeded the number of tries to enter a password. Your account is now locked. Call customer service.''
endif
endloop
}
For this section of code, which of the following issues should be identified during a code review?
Variables have not been properly defined with meaningful names
There are unused variables defined
Divisors are not tested for zero
Loop counters are not properly initialized
There are endless loops
There are statements within the loop that should be outside the loop
Rueben
6 months agoChantell
6 months agoMarion
7 months agoFranklyn
7 months agoCarri
7 months agoJesusa
7 months agoNieves
7 months agoAleta
8 months agoPauline
8 months agoAbel
8 months agoLettie
8 months agoGilbert
8 months agoPortia
1 year agoDanica
12 months agoZack
12 months agoCallie
12 months agoJennie
12 months agoJesusa
12 months agoBuck
1 year agoJeniffer
1 year agoBernadine
1 year agoTamie
1 year agoKati
1 year agoWalker
1 year agoTula
1 year agoAnnett
1 year agoLeonora
1 year agoShanda
1 year ago