Assignment 05

Disclaimer: Dieser Thread wurde aus dem alten Forum importiert. Daher werden eventuell nicht alle Formatierungen richtig angezeigt. Der ursprüngliche Thread beginnt im zweiten Post dieses Threads.

Assignment 05
I already uploaded assignment 05 for next week, since you’re supposed to do some programming there.This gives you additional time to get acquainted with the provided classes and ask questions if anything should be unclear, confusing or annoying with respect to the implementation.


Pair.toString() outputs no closing brackets.
Node does not implement equals(), despite having an id field.


It also does not implement [m]hashCode()[/m], making it hard to work with. Rolling your own subclass of [m]Node[/m] is possible, assuming two nodes can be considered equal iff their [m]id[/m] are equal.


This is why I hate java -.-

Fair assumption for the purposes of this exercise. But that doesn’t require a new subclass, just replace n1 == n2 by n1.id == n2.id, it would make your code much easier to grade for me than working with a new subclass :wink:


Hi,

Ich haette zwei kleine Fragen:

  1. Wie komme ich an die evidence der Vater knoten? Such ich einfach den Knoten in der evidence Liste oder hab ich da was falsch verstanden?
  2. Der Test faengt mit TBC an, das hat aber nur einen Knoten als elternknoten. Muss ich mir vorher ne Liste mit der Reihenfolge der Knoten machen?

Vielen Dank fuer alle Antworten!!
Eigelb