[Year 12 SofDev] VITTA SD Exam 2 - A15-16
Mark KELLY
kel at mckinnonsc.vic.edu.au
Fri Aug 10 13:39:21 EST 2012
Unfortunately the pseudocode of FunctionB is broken - twice - and I think
the answer might be iffy.
1. The line *If A[iCount] > compItem* has an ELSE but no terminating END IF.
2. The FOR loop has no terminating NEXT or END FOR.
3. A16 asks how many times functionB will be called - the solution says 3
times.
Recursion always does my head in so I have not deskchecked it, but it seems
to me that the RETURN line actually calls functionB twice (once for arrLeft
and once for arrRight) so I'd say if that line is executed 3 times,
FunctionB would actually be called 6 times... I'm open to repudiation :-)
Then it's more probably 7 times - once for the initial functionB call from
outside, then 3x2 times during recursion.
Anyway, it's rather too hard for SD, I'd say: recursion should not be
needed for SD exams. VCAA papers have not been so tough (so far!)
--
Mark Kelly
Manager of ICT, Reporting, IT Learning Area
McKinnon Secondary College
McKinnon Rd McKinnon 3204, Victoria, Australia
Direct line / Voicemail: +613 8520 9085, Fax +613 9578 9253
kel at mckinnonsc.vic.edu.au << use this, not Edumail please!
VCE IT Lecture Notes: http://vceit.com
Moderator: IT Applications Edulist
--
The illiterate of the 21st century will not be those who cannot read and
write, but those who cannot learn, unlearn and relearn - Alvin Toffler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20120810/7f5f4f4b/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vitta-exam2-A15.gif
Type: image/gif
Size: 12588 bytes
Desc: not available
Url : http://www.edulists.com.au/pipermail/sofdev/attachments/20120810/7f5f4f4b/vitta-exam2-A15-0001.gif
More information about the sofdev
mailing list