-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFlight.java
More file actions
58 lines (46 loc) · 944 Bytes
/
Flight.java
File metadata and controls
58 lines (46 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package classes;
public class Flight
{
private String modelAvion;
private Plane plane;
private Airport arrival;
private Airport departure;
private String company;
private String id;
public Flight(String id, Airport a1, Airport a2, String company, String model)
{
this.id = id;
this.departure = a1;
this.arrival = a2;
this.company = company;
this.modelAvion=model;
}
@Override
public String toString()
{
String str = "";
str+= "vol numéro "+id+" au bord d'un " + modelAvion +" appartenant a la compagnie "+company+" qui va de : "+ departure.getShortName() +" à "+arrival.getShortName();
return str;
}
/**
* @return the arrival
*/
public Airport getArrival()
{
return arrival;
}
/**
* @return the departure
*/
public Airport getDeparture()
{
return departure;
}
/**
* @param plane the plane to set
*/
public void setPlane(Plane plane)
{
this.plane = plane;
}
}