logo

import java.text.NumberFormat;.

   

Added on  2019-09-16

2 Pages340 Words471 Views
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, int durationTime,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;}

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Assignment on UML Class Diagram
|5
|722
|50

Java Assignment Help | Online Homework
|13
|1219
|353

CarYardMIT162011 Class Implementation in Java
|6
|1107
|393

Java Programming Assignments with Solutions
|9
|904
|164

Java Code import java.util.Scanner; /** * * File name
|2
|257
|314

Design Documentation Program Algorithm
|15
|2080
|86