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


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

Login to reply

👍?
helpful
7:26pm Wed 22nd May, ANONYMOUS

Hi, I have been struggling to FIX the below error, can you please point out where I'm going wrong? testIteration: ERROR: expected 20948682, received 20948678 Cheers!!!


SVG not supported

Login to reply

👍?
helpful
11:18am Thu 23rd May, Andrew G.

ANONYMOUS wrote:
> Hi, > > I have been struggling to FIX the below error, can you please point out where I'm going wrong? > > testIteration: ERROR: expected 20948682, received 20948678 > > Cheers!!!
The only information you have provided is that your `StudentListIterator` is failing the `testIteration` test. There is no really any information to work from here to help you. All I can say is that your `StudentListIterator` is returning the wrong `Student` and is hence incorrect. Given the message you have received, I assume your code is failing at line 66 of `StudentListIteratorTest.java`:
stats.expect("20948682", received.reverseNext().getId());
which is the first call to `reverseNext()`, so I assume your `reverseNext()` is incorrect. Indeed, it appears to be returning the frontmost element in the iterator rather than the backmost.

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