diff --git a/Class-07/models/AirportTrip.java b/Class-07/models/AirportTrip.java new file mode 100644 index 0000000..d8bea82 --- /dev/null +++ b/Class-07/models/AirportTrip.java @@ -0,0 +1,37 @@ +package models; + +public class AirportTrip extends TravelTwoCities{ + + private double speed; + private double distance; + private City cityOne; + private City cityTwo; + private String airportName; + private double distanceToAirport; + + + +public AirportTrip(double speed, double distance, City cityOne, City cityTwo,String airportName,double distanceToAirport){ + super(speed,distance,cityOne,cityTwo); + this.airportName=airportName; + this.distanceToAirport=distanceToAirport; + + +} + + public void setAirportName(String airportName){ + this.airportName=airportName; + } + + public String getAirportName(){ + return airportName; + } + + public void setDistanceToAirport(double distance){ + this.distanceToAirport=distanceToAirport; + } + + public double getDistanceToAirport(){ + return distanceToAirport; + } +} diff --git a/Class-07/models/TrainTrip.java b/Class-07/models/TrainTrip.java new file mode 100644 index 0000000..eaed2ae --- /dev/null +++ b/Class-07/models/TrainTrip.java @@ -0,0 +1,44 @@ +package models; +public class TrainTrip extends TravelTwoCities{ + + + + private double speed; + private double distance; + private City cityOne; + private City cityTwo; + private String stationName; + private char MaximunClass; + + + + + public TrainTrip(double speed, double distance, City cityOne, City cityTwo,String stationName,char MaximunClass ){ + super(speed,distance,cityOne,cityTwo); + this.stationName=stationName; + this.MaximunClass=MaximunClass; + + } + + + + + public char getMaximunClass(){ + return MaximunClass; + } + + public void setMaximunClass(char MaximunClass){ + this.MaximunClass = MaximunClass; + } + + public String getStationName(){ + return stationName; + } + + public void setStationName(){ + this.stationName=stationName; + } + + + +} \ No newline at end of file