Question 22 exam thoughts (1 Viewer)

jumentous

New Member
Joined
Oct 10, 2003
Messages
9
i had about 30min at the end to go back and look over what i had done missed and i spent basically all that time on this (and i dont care what my exam strategy is like) The only Logic error i could see is that the system could not be turned off without a card having been enetered. While there was no card in the machine the while loop was never exited and so even if system_on was changed elsewhere the system couldn't shut down until a card was entered. There were a number of errors in the algorithm but they were all syntax, ie switched_on and system_on so i dont think this is what they are refering to, its not a hell of a lot you would have to write to change the algortihm, and although SDD people SUCK at writing exams i am sure they were after a 'logic' error, and i dont remember who said it but i think that the algorithm lined up with the structure diagram almost perfectly. OH and for software people they have a whole stack of initialisations and setting booleans that are just a waste of time
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Originally posted by SamD
No, you don't need all my waffle. That was my analysis of the question, not a recommended solution.

From a student's point of view it really doesn't matter too much that the question was a bit bodgy. The marking process is extremely thorough, and I can confidently say that answers with worth will be awarded marks accordingly.

HTH
Sam
Sam your fixed up algorithm first of all seems much better than the shit i saw lol...

but anyways question first of all dealing with WHILE loops in programming, wouldnt if System_on is a boolean variable and explicity needs an assignment of true or false require it in the WHILE loop, because that will be the most easiest way to end to loop

so..

WHILE System_on = True

do wateva

END WHILE

and when you need to exit the loop setting System_on to false

i wrote about it wont enter the loop at all and plus no assignment is even given to that so yea...
 

Lazarus

Retired
Joined
Jul 6, 2002
Messages
5,965
Location
CBD
Gender
Male
HSC
2001
Originally posted by Winston
WHILE System_on = True

do wateva

END WHILE
Edit: You can probably disregard this post - I'd forgotten that you were using pseudocode and not actual code... and in pseudocode '=' might mean compare and not assign (as opposed to '==' normally meaning compare).

This would result in an infinite loop.

The assignment statement 'System_on = True' would always sucessfully excute, and hence would always return 'true' itself. The loop then becomes:

WHILE true
...
END WHILE
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Originally posted by Lazarus
Edit: You can probably disregard this post - I'd forgotten that you were using pseudocode and not actual code... and in pseudocode '=' might mean compare and not assign (as opposed to '==' normally meaning compare).

But it looks to me = is an assignment statment, because they did that in the initialisation of that sub routine.
 

-X-

Member
Joined
Aug 10, 2003
Messages
481
Gender
Undisclosed
HSC
N/A
Originally posted by Winston
But it looks to me = is an assignment statment, because they did that in the initialisation of that sub routine.
Usually in pseudocode, "=" can be used as an assignment statement and meaning "compare".
 

Protector

a little unsane
Joined
Nov 20, 2003
Messages
174
Location
Sydney
Gender
Male
HSC
2006
The error "Switched_on" as opposed to "System_on" was purely a syntax error, not logical. Whereas the issue of the VALIDATED boolean function was a logical disaster. However I concur that "Switched_on" / "System_on" was the answer they sought...

Thats my two cents...
 

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

Top