import java.text.NumberFormat;.

Added on - 18 Sep 2019

  • 2


  • 340


  • 94


  • 0


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;}
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document