|
Post by gabbie on Feb 3, 2002 16:19:19 GMT -5
need help... read over assignment... kinda get it... neone wif hints on how to start this thing ? my head is rilly confused.. i haf a rilly busy week... ontop of this assignment i haf another 2 assignments n 2 tests.. then another 2 tests on mon n tues the following week... argh... no time left... dying here.. please help please help.. brain isn't working properly.. no sleep for a few day s~!!! ARGHHHHHHH please please please.. i kinda gave up on part 1.. since memory models are still foreign to me... part 2 i kinda started.. but dunno how 2 fill ne of dat stuff in... still stuck on tagiterator.. please help neone
|
|
|
Post by Sylph on Feb 3, 2002 17:50:50 GMT -5
make TagIterator class, copy and paste methods & method headers & hint variables from handout into ur class... read over topics on this board that concern TagIterator...
any specific questions??
|
|
|
Post by gabbie on Feb 3, 2002 18:19:04 GMT -5
got all that i fink hafing trouble wif getReadyForNext..... thanks
|
|
|
Post by EurasianVixen on Feb 3, 2002 21:24:12 GMT -5
Yeah, does anyone know what to do with getReadyForNext method? What is its function? And why is it a void?
|
|
|
Post by EurasianVixen on Feb 3, 2002 21:24:51 GMT -5
Yeah, does anyone know what to do with getReadyForNext method? What is its function? And why is it a void?
|
|
|
Post by Sylph on Feb 3, 2002 21:40:34 GMT -5
getReadyForNext() sets things up so that hasNext() and next() are ready to return something. if next() is called, it returns an Object, but at the same time, something has to set things up so that next() returns the next Object when it is called the next time. this setup can't be done by hasNext(), becuz someone can call hasNext() twice, yet not want to call next() yet...
|
|
|
Post by Yingster on Feb 3, 2002 21:42:11 GMT -5
so when we call the method next the first time is it suppose to return the 1st tag in the file or the 2nd?
|
|
|
Post by Random_Death on Feb 3, 2002 21:49:12 GMT -5
The first tag. Don't skip the first tag.
|
|
|
Post by Sylph on Feb 3, 2002 21:50:32 GMT -5
getReadyForNext() would be called in the constructor, so it'd be ready to use next() to call the 1st tag.
in next(), a little something has to be done so that getReadyForNext() doesn't change the Object to be returned before it is returned.
|
|
|
Post by EurasianVixen on Feb 3, 2002 22:04:15 GMT -5
Hmm .. I still don't get it So getReadyForNext() has no parameters? And next() would be called from getReadyForNext()??
|
|
|
Post by Yingster on Feb 3, 2002 22:07:24 GMT -5
next() would be called from the main method not from any class within TagIterator
|
|
|
Post by Random_Death on Feb 3, 2002 22:07:42 GMT -5
Remember, that their hints on how you should do it is how there solution is. There's other ways of writing these two classes.
Anyhow, yep, getReadyForNext() has no parameters. And no, next() is not called from getReadyForNext(). The method next() is called by some client code like some main class somewhere that's using your TagIterator or LinkIterator.
|
|
|
Post by EurasianVixen on Feb 3, 2002 22:54:11 GMT -5
Well, I managed to use getReadyForNext() working but it performs differently than what is stated on the assignment. Is it ok if I changed the function of this method? Or will marks be deducted? B/c it doesn't do any storing really ...
|
|
|
Post by EurasianVixen on Feb 4, 2002 23:54:17 GMT -5
Yeah I think I understand now. Thanks guys
|
|
|
Post by gabbie on Feb 5, 2002 0:54:49 GMT -5
THANKS FOR ALL YOUR COMMENTS N HELP PPL ~!!! RILLY APPRECIATED.... now next question........ HOW TO START PART 1 NeED HELP LEARNING TO DRAW MEMORY MODELS PLEASE ....=)
|
|