It's UWAweek 26 (mid-year break)

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 9 other people reading this forum.


 UWA week 20 (1st semester, week 11) ↓
SVG not supported

Login to reply

👍?
helpful
3:17pm Thu 16th May, Andrew G.

"Fudong Qin" <23*9*8*6@s*u*e*t*u*a*e*u*a*> wrote:
> I noticed in the StudentListIteratorTest that when where is only one page and the iterator is at the last element, calling next() method will go back to the first element. This is contrary to the common behavior of throwing a NoSuchElementException. > > Your clarification would greatly aid my understanding of our StudentList iterator's functionality. > > Thank you in advance
I do not understand your confusion. The test appears to be functioning as expected. What do you mean by the iterator being "at the last element"? `NoSuchElementException` should only be thrown when there is no element to return. The test you appear to be referring to constructs a `MockStudentList` containing 4 students, and then consumes exactly 4 elements from the `StudentListIterator`. At no point should the iterator run out of elements. Gozz

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