It's UWAweek 24 (1st semester, 2nd exam week)

help2005

This forum is provided to promote discussion amongst students enrolled in CITS2005 Object Oriented Programming.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 257 articles.
Currently 1 other person reading this forum.


 UWA week 21 (1st semester, week 12) ↓
SVG not supported

Login to reply

👍?
helpful
12:21pm Tue 21st May, Andrew G.

ANONYMOUS wrote:
> When i tired to use while loops and array lists todo this task i always ended up with getpage() called too many times error. > > however, when i did just: > StudentListIterator iterator = new StudentListIterator(list); > return Itertools.reversed(iterator); > > it passed the tasks, I'm not sure what I'm missing here. > Can someone help me?
It turns out that by simple bad luck, the randomly generated tests rolled a 1-in-64 chance and generated a case where all six of the newest students in the list have done "CITS2005". This means that the test can be fooled by just reversing the list. This is *not* a correct solution in general, however. You should not attempt to circumvent the tests in this way. The previous solution you described is incorrect in a different way. Recall that the instructions say that `StudentListIterator` should only call `getPage()` as required. It sounds like you are calling `getPage()` repeatedly to load the whole list. This is unnecessary.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy