import java.text.NumberFormat;.

Added on - 16 Sep 2019

Trusted by 2+ million users,
1000+ happy students everyday
Showing pages 1 to 1 of 2 pages
import java.text.NumberFormat;public class Flight {Plane plane;String flightNumber;double flightCost;Time departureTime;int durationTime;Airport sourceAirport;Airport destinationAirport;public Flight(Plane plane, String flightNumber, double flightCost, Time departureTime, intdurationTime,Airport sourceAirport, Airport destinationAirport) {this.plane = plane;this.flightNumber = flightNumber;this.flightCost = flightCost;this.departureTime = departureTime;this.durationTime = durationTime;this.sourceAirport = sourceAirport;this.destinationAirport = destinationAirport;}public Plane getPlane() {return plane;}public String getNumber() {return flightNumber;}public double getCost() {return flightCost;}public Airport getDestination() {return destinationAirport;}public Time getDeparture() {return departureTime;}public Time getArrival() {Time arrivalTime = new Time(departureTime.getHour(), departureTime.getMinute());arrivalTime.addMinutes(durationTime);return arrivalTime;}
Desklib Logo
You are reading a preview
Upload your documents to download or

Become a Desklib member to get access