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


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

Login to reply

👍?
helpful
12:33pm Mon 20th May, Andrew G.

ANONYMOUS wrote:

Hi, I just started task 8 and noticed how much larger the workload is compared to the previous tasks, which is quite overwhelming.

I'm very lost on how to approach this task. I understand that next() function must check a page and move on if the page is out of students, however I can't wrap my head around how the retries is working alongside it. Would it be possible to get a good explanation about this?

As I understand your question here, all the information you require is in the project instructions and the documentation comments to which they refer. Please read them carefully again, and if you are still confused, please reply to this thread with more detail as to what it is you are confused about so I can try to help you.

At the moment my next() runs hasNext first and returns the usual NoSuchElementException() However, this Task introduces two new errors: QueryTimedOutException and ApiUnreachableException

Does ApiUnreachableException replace NoSuchElementException??? And is QueryTimedOutException to go alongside the retries when we call get page?

No, ApiUnreachableException does not replace NoSuchElementException. NoSuchElementException should be thrown when attempting to call next() on an iterator that has no remaining elements to give. Per the documentation, an ApiUnreachableException should be thrown when you have attempted to call getPage() on the API, but have not been able to get a response even after trying as many times as specified by the retry quota, and so are unable to reach the API.

All this information is in the provided materials, as mentioned above, so I am not sure if this is your confusion. Let me know if it's something else.

I will also mention that the tests check for the expected behaviour here, so if you get it wrong (at least in the obvious ways like using the wrong exception) the tests should make that clear.

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