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.
ANONYMOUS wrote
The specific test you are referring to is testUnitNewestStudents() . The javadoc comments on unitNewestStudents() says "Returns an iterator over the students who have taken a given unit, from newest to oldest ." The ids list y...
ANONYMOUS wrote
This is probably the first task in the project where you really need to reason about and design your solution before trying to write it.
Imagine yourself as the StudentListIterator , and imagine receiving calls to next() and revers...
Dear Max and Gozz,
As mentioned in the StudentList.java "Student IDs are assigned in strictly increasing order, and the list is sorted in ascending
order by student ID such that older student records appear at the start of the list and newer
stud...
Erm... Well the constructor shouldn't consume any part of the iterator. And hasNext() also shouldn't consume, so I assume there's an issue somewhere in there.
I cannot pass the test, and it returns called next reverseNext too many times or too soon, expected 0, recerved 1. Would you please give me some hit about that?
Thank you very much
I find it quite likely that you're overcomplicating it or trying to consume the whole iterator into a stack or something like that, when the iterator should largely be completely passive and only make method calls to the double ended iterator as and ...
It's a reversed double ended iterator. If you're calling next, it should be consuming from the end of the double ended iterator passed in the constructor, if you're calling reverseNext, it should be consuming from the start of the double ended iterat...
Stuck here for 2 days and still got nothing so here I am asking for help.
I just can't figure out a way to reverse the Iterator without using next() which will increase the count.
I've tried Stream to read from memory and Reflection to create a new ins...
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 t...
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.
Y...
I think your wording is a little unclear, so I am not 100 sure I understand what you are asking. I believe you are asking whether the specified number of retries is for the whole lifetime of the StudentListIterator, or for each attempt to call getP...
By the specification, you should not preload the first element on construction, as it says you should consume elements from the iterator only as required. If I call your filter method and then do not use the returned iterator, there was no reason for...
ANONYMOUS wrote
Note that the test does not consume the iterator until exhaustion. It only consumes the first six elements.
To quote the project specification "The iterator should not simply load the entire list and then iterate over it, as if we nee...
ANONYMOUS wrote
I assume you meant to post this as a new question rather than a reply to someone else's post.
As a quick answer The project uses a range of concepts from across the semester, but the ones other students seem to be needing to review ar...
1. For StudentStats.java
The relevant test mentions
Can be done in 3 calls, but allow some leeway
stats.assertLessThanEqual(list.getCountGetPage(), 5, "too many calls to getPage()");
And they use this given id list "20948760", "20948758", "20948756"...
Hello,
I am struggling on some of the tasks and was wondering what lectures I should look at re-watch? Also are we suppose to create our own .java files within the itertools studentstats folder or do we write our code for the tasks within the Itertoo...
ANONYMOUS wrote
I am not sure I understand your question. What do you mean by "actual conditions" and "generic"?
As best as I can interpret your question, you appear to be asking what elements to filter out? Per the instructions and documentation, the...
ANONYMOUS wrote
I am not sure I understand your question, but if you are asking what I think you are, that is basically what you have been asked to implement for this task.
The instructions, documentation comments, and tests provide a clear specificat...
The CITS2005 Project has been released. You can find it under the Project (https lms.uwa.edu.au webapps blackboard content listContentEditable.jsp?content id 3592232 1 course id 90611 1 mode reset) link in the sidebar on LMS.
The project is due a...