Fix Arc and add @deprecated javadoc for students to implement.

This commit is contained in:
Holt59
2018-03-09 21:26:38 +01:00
parent 440dc48c6a
commit e0268c80af
3 changed files with 27 additions and 21 deletions

View File

@@ -9,7 +9,7 @@ import java.util.List;
* arc implementation that stores data relative to the arc.
*
*/
class ArcForward implements Arc {
class ArcForward extends Arc {
// Destination node.
private final Node origin, destination;
@@ -52,15 +52,10 @@ class ArcForward implements Arc {
}
@Override
public float getLength() {
public double getLength() {
return length;
}
@Override
public double getMinimumTravelTime() {
return getLength() * 3600.0 / (info.getMaximumSpeed() * 1000.0);
}
@Override
public RoadInformation getRoadInformation() {
return info;