import java.text.NumberFormat;.

Added on - 16 Sep 2019

  • Dissertation

    type

  • 2

    pages

  • 340

    words

  • 55

    views

  • 0

    downloads

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’re reading a preview
card-image

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Unlock This Document