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 the 3 articles in this topic
Showing 3 of 257 articles.
Currently 2 other people reading this forum.


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

Login to reply

👍?
helpful
12:40am Tue 21st May, ANONYMOUS

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?


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.


SVG not supported

Login to reply

👍?
helpful
8:23pm Tue 21st May, ANONYMOUS

Can I make changes in the UnitAverage method in studentstats.java?

Because after I implemented task 8 and tried running the tests (without beginning task 9) I got error for the UnitAverage method since it uses my implementation of StudentListIterator.

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