Question 22 exam thoughts (1 Viewer)

JRasnier

Member
Joined
Apr 24, 2003
Messages
416
well whatever it is, it isnt a logical, but can someone say something about the supposed error about line 21, that i suggested...
 

JRasnier

Member
Joined
Apr 24, 2003
Messages
416
exactly why im saying line 21 i see is a logical error, cause it is validating as true, even if it may be false......
 

saves.the.day

Member
Joined
Oct 29, 2003
Messages
233
Location
Castle Hill
Gender
Undisclosed
HSC
2003
Originally posted by JRasnier
i actually said line 21 was wrong, validated = true, cause i said that the door would always be validated as true as long as it was switched on....dayum it dayum it...
yeh i said similar.

At the end of the loop
validated=TRUE

then the loop starts again and validated=FALSE so validated is set to false again and the IF satement at the middle can never be satisfied.
 

JRasnier

Member
Joined
Apr 24, 2003
Messages
416
but the system still lets them in, just cause it set back to false its not letting them in, if it doesnt let them in just cause of that validated=false at the start of the loop, then when its accecpted within the sub program then it will never be true since it will just loop back to the top....
 

JRasnier

Member
Joined
Apr 24, 2003
Messages
416
well i dont, see how Reading the cardslot even if a card is not there, also isnt really a biggie either...unless there is a trigger telling that there is a card there or not, btu we dont knwo that, so there reader might be the one telling if there is a card there or not..
 

Saintly Devil

Member
Joined
Oct 12, 2002
Messages
107
Originally posted by zoodboog
i dont see how thats a logic error. if validated = false, nothing happens (ie it doesnt let you into the menu), which is what would happen in real life as well (well you might get an error message as well).
Yes, it doesn't let you in to the menu. But then you can go through the loop again, enter the same CustomerNumber and retype the password as many times you want until you get the right one.

edit: btw, the guess password 3 times stuff was handled in AcceptAndValidatePassword, look at part iii, the mainline was fine
No the mainline isn't fine. It SEEMS fine, but it doesn't fulfill its purpose fully. You can attempt to get the right password 3 times, but if you don't - nothing happens, and that's wrong. Something should happen because otherwise it allows you to crack the password via trial and error. That's the logic error. As i said before, the error needn't be in-your-face, it can be subtle - which is most often the case with logic errors.
 

JRasnier

Member
Joined
Apr 24, 2003
Messages
416
but that might be logically stoopid but noone ever said its logically wrong to the program, they may want it happening more then 3 times, also there not typing password, well it says nothing about a password being typed, i see it coming fromt he card...
 

Saintly Devil

Member
Joined
Oct 12, 2002
Messages
107
Originally posted by JRasnier
but that might be logically stoopid but noone ever said its logically wrong to the program, they may want it happening more then 3 times, also there not typing password, well it says nothing about a password being typed, i see it coming fromt he card...
Actually if you look at the structure diagram on the previous page the password is keyed in, with the Keyed Password parameter being passed from the module "Accept password" back up to the module "Accept and validate password"

Also, you have to see the error in the context of the full question. it said "Locate the error and describe its EFFECT ON THE SYSTEM". The system in this case was not the algorithm we were given. It was the whole autoteller management system.
 

psycho_mushy

Member
Joined
Aug 22, 2003
Messages
661
Gender
Undisclosed
HSC
1998
for the Logic error I sayd

WHILE NOT CardInSlot
READ cardslot

I said this coz it says "while the card is not in slot, read slot" it was I'm assuming logic error so I put that down.... I didn't refer to antyhing after it coz it said logic error and that seemed pretty logical to me
 

new1

New Member
Joined
Oct 20, 2003
Messages
26
Location
Sydney
my first look was the validation = true on line 21. Then i realised that its completely useless, has no effects and prolly there to trick us. I ended up saying that the logic error was the typo on line 4 'switched_on' and while it can be seen by us to be a syntax error, it isnt part of the syntax of pseudocode and is seen by the program as undefined variable.

i reckon it was a type of 'system_on' cause then the boolean shit makes everything else valid.
ramifications of the type means system could never be turned on - big error, logic error at that.

wouldnt it be funny if the dude (or girl) typing the test just fucked up and didnt notice, and there was a proper error somewhere! :D
 

failingTheHsc

Member
Joined
Oct 27, 2003
Messages
37
hmmm i had no idea so i put that customer number wasnt sent to AcceptAndValidatePassword

if this happens than the password will be the same regardless of the customer number
which means that someone could get into an account, or customers could not access their account????
 

-X-

Member
Joined
Aug 10, 2003
Messages
481
Gender
Undisclosed
HSC
N/A
Firstly can some one explain what "READ cardslot" does? Does it detect a card or does it read the info from a card?
 

blazing9

New Member
Joined
Oct 22, 2003
Messages
5
I said the error was teh Validated = True. It meant that even if the password was right, validated would become true. It had no use otherwise. It should have said False therefore preventing someone from breaking the loop and hacking in. Thats what I said anyway. I saw a few others that may have been errors as well
 

mattyb

New Member
Joined
Nov 4, 2003
Messages
23
Location
ashtonfield
Gender
Male
HSC
2003
did you guys ever think that there was no answer? like if it was kinda rhetorical and how u back up your answer and repair the "error" that you discovered that counts?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top