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


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

Login to reply

👍?
helpful
7:56am Wed 22nd May, ANONYMOUS

Hi I keep running my code and getting this error. I don't know how to fix it without changing the test CountingDoubleEndedIterator itself. If you have any idea or had the same issue, a hint would be greatly appreciated, thank you. Running tests itertools ItertoolsTest testTake: OK Exception in thread "main" java.lang.Error: Unresolved compilation problem: The type CountingDoubleEndedIterator<T> must implement the inherited abstract method DoubleEndedIterator<T>.hasPrevious()


SVG not supported

Login to reply

👍?
helpful
10:41am Wed 22nd May, Andrew G.

ANONYMOUS wrote:
> Hi I keep running my code and getting this error. I don't know how to fix it without changing the test CountingDoubleEndedIterator itself. If you have any idea or had the same issue, a hint would be greatly appreciated, thank you. > > Running tests > itertools > ItertoolsTest > testTake: OK > Exception in thread "main" java.lang.Error: Unresolved compilation problem: > The type CountingDoubleEndedIterator<T> must implement the inherited abstract method DoubleEndedIterator<T>.hasPrevious()
The `DoubleEndedIterator` as provided has no `hasPrevious()` method. I can only assume you have added this yourself. There is no reason to modify the `DoubleEndedIterator` interface, and you should not do so. You are under explicit instruction that any modifications you make to the test will be discarded, and modifying `DoubleEndedIterator` in this fashion will cause the tests to fail, and will mean you do not get the marks. I recommend you put `DoubleEndedIterator` back the way it was provided, and fix the rest of your code. What motivated you to add a method to the `DoubleEndedIterator` interface? What is your `hasPrevious()` method even meant to do?

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