TrainRoute.java - import java.text.NumberFormat public class TrainRoute cfw Train train String trainNumber double routeCost Time departureTime int

TrainRoute.java - import java.text.NumberFormat public...

This preview shows page 1 - 2 out of 2 pages.

import java.text.NumberFormat;public class TrainRoute {Train train;String trainNumber;double routeCost;Time departureTime;int durationTime;TrainStation sourceTrainStation;TrainStation destinationTrainStation;public TrainRoute(Train train, String trainNumber, double routeCost, Time departureTime, int durationTime,TrainStation sourceTrainStation, TrainStation destinationTrainStation) {this.train = train;this.trainNumber = trainNumber;this.routeCost = routeCost;this.departureTime = departureTime;this.durationTime = durationTime;this.sourceTrainStation = sourceTrainStation;this.destinationTrainStation = destinationTrainStation;}public Train getTrain() {return train;}public String getNumber() {return trainNumber;}public double getCost() {return routeCost;}public TrainStation getDestination() {return destinationTrainStation;}public Time getDeparture() {return departureTime;}public Time getArrival() {Time arrivalTime = new Time(departureTime.getHour(),

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture