Class Bus

    • Field Detail

      • departureLocation

        protected RoadLocation departureLocation
      • capacity

        protected int capacity
      • mileageCost

        protected int mileageCost
      • nextStop

        protected BusStop nextStop
    • Constructor Detail

      • Bus

        public Bus()
    • Method Detail

      • getName

        public String getName()
      • setName

        public void setName​(String name)
      • getDepartureLocation

        public RoadLocation getDepartureLocation()
      • setDepartureLocation

        public void setDepartureLocation​(RoadLocation departureLocation)
      • getCapacity

        public int getCapacity()
      • setCapacity

        public void setCapacity​(int capacity)
      • getMileageCost

        public int getMileageCost()
      • setMileageCost

        public void setMileageCost​(int mileageCost)
      • getPassengerQuantityTotal

        public Integer getPassengerQuantityTotal()
      • setPassengerQuantityTotal

        public void setPassengerQuantityTotal​(Integer passengerQuantityTotal)
      • getSetupCost

        public abstract int getSetupCost()
      • getBus

        public Bus getBus()
        Specified by:
        getBus in interface BusOrStop
        Returns:
        sometimes null
      • getDistanceFromTo

        public abstract int getDistanceFromTo​(RoadLocation sourceLocation,
                                              RoadLocation targetLocation)
      • getDurationFromTo

        public abstract int getDurationFromTo​(RoadLocation sourceLocation,
                                              RoadLocation targetLocation)
      • getDestination

        public abstract StopOrHub getDestination()