T
TheTravellingSalesman
I'm using eclipse to write my java program.
I am writing a class call it Node2 which extends Node1
The only difference is that Node1 has a constructor that take (double,
String, double) as parameters and it works absolutely fine <-- as I
tested node1.
However, when writing the node2's constructor, I have the following
=====================================================================
//The only difference between the two nodes is that Node 2 take an
additional vector as input.
public Node2 (double a1, String a2, double a3, Vector otherNodes)
{ super(a1,a2,a3);
this.nextNodes = otherNodes;
}
// the problem comes in line where I'm calling super because the
compiler (eclipse 3.2.2.) does not recognize super constructor of
node1.it says that the
"constructor (double, String, double) is undefined".
======================================================================
Any idea what I'm doing wrong or why would something like this
happen?
Any help is appreciated
I am writing a class call it Node2 which extends Node1
The only difference is that Node1 has a constructor that take (double,
String, double) as parameters and it works absolutely fine <-- as I
tested node1.
However, when writing the node2's constructor, I have the following
=====================================================================
//The only difference between the two nodes is that Node 2 take an
additional vector as input.
public Node2 (double a1, String a2, double a3, Vector otherNodes)
{ super(a1,a2,a3);
this.nextNodes = otherNodes;
}
// the problem comes in line where I'm calling super because the
compiler (eclipse 3.2.2.) does not recognize super constructor of
node1.it says that the
"constructor (double, String, double) is undefined".
======================================================================
Any idea what I'm doing wrong or why would something like this
happen?
Any help is appreciated