https://secure.csse.uwa.edu.au/run/help2200?p=np&rss=y
help2200 - Lab 5help2200 - Lab 5help2200https://blogs.law.harvard.edu/tech/rssThe University of Western AustraliaThu, 04 Jun 2020 18:22:34 +0800Thu, 04 Jun 2020 18:22:34 +0800Re: Lab 5
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=150
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=150Sat, 11 Apr 2020 15:53:18 +0800ANONYMOUSActually, does this method only return an iterator based on the nested class we have to
create? I looked at topic 9 of the lectures, and I was wondering if the things that were
covered there was a little similar to what this lab is about?
Re: Lab 5
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=148
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=148Fri, 10 Apr 2020 20:55:20 +0800ANONYMOUS
Sorry. What I meant was how are we supposed to store items from the nodes into an
iterator that traverses the tree when we can only work on two methods?
Re: Lab 5
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=147
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=147Fri, 10 Apr 2020 20:25:50 +0800ANONYMOUSANONYMOUS wrote:
Yes I think so
Not sure what youâ€™re storing and in what sorry
>if we're only provided methods like next() and isNext()?
We must provide those methods ourselves, next and hasNext
Re: Lab 5
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=146
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=146Fri, 10 Apr 2020 18:37:08 +0800ANONYMOUSOkay, I see what you mean with the extension.
So we need to make a nested class for Iterator within BinTree? How are we even going to be able to store
anything in it if we're only provided methods like next() and isNext()?
Re: Lab 5
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=144
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=144Fri, 10 Apr 2020 15:22:34 +0800ANONYMOUSIn the BinaryTree class: item stores the root item, left stores the left BinaryTree child, right stores
the right BinaryTree child. To begin the lab write a class BinTree extends BinaryTree and write two
methods in it, equals(Object) and iterator(). The iterator() returns an instance of a class you must also
write within BinTree that implements CITS2200.Iterator for a BinaryTree. I may have some terminology
wrong here...
Re: Lab 5
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=142
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=142Fri, 10 Apr 2020 08:46:12 +0800ANONYMOUSCan someone at least tell me what the instance variables of the class are? I think I already
know, but I want to be sure I'm correct.
Lab 5
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=128
https://secure.csse.uwa.edu.au/run/help2200?p=np&a=128Fri, 03 Apr 2020 10:45:58 +0800ANONYMOUSI' puzzled on where to start for this lab's exercise. BinTree is a subclass of
BinaryTree, and we're supposed to write a class for BinTree. If BinTree is a subclass
of Binary Tree, why does it need to initialize 2 BinaryTree variables instead of
BinTree variables?
Are we supposed to code the same BinTree methods provided by the lecture?
Do we need to use the super methods instead of initializing the variables ourselves if
they are provided?
I'm sorry if this doesn't make sense, but I feel like this is still vague to me.