Travelable interface

Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
HeshamTB 2020-12-02 00:50:18 +03:00
parent 35ce9ca754
commit d4be36ebf8
Signed by: Hesham
GPG Key ID: 74876157D199B09E
3 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
public class Route {
public class Route implements Travelable {
private Street[] streets;
private District hotelArea;

View File

@ -1,6 +1,6 @@
import java.util.ArrayList;
public class Street {
public class Street implements Travelable {
private double length;
private int numberOfLanes;

3
src/Travelable.java Normal file
View File

@ -0,0 +1,3 @@
public interface Travelable {
String getFastestTimeOfTravel(Vehicle vehicle);
}