forked from PlanesWithBrains/PlaneGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFlight.java
More file actions
executable file
·57 lines (52 loc) · 1.36 KB
/
Flight.java
File metadata and controls
executable file
·57 lines (52 loc) · 1.36 KB
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
package sample;
import java.time.LocalDateTime;
import java.time.LocalTime;
enum Airline{
S7,//S7,
SU,//Аэрофлот,
N4,//Nordwind,
A4, //Азимут
DP,//Победа,
QR,//QatarAirways,
EK//EmiratesAirline
}
enum Direction{
NorthWest,NorthEast,East,West,SouthWest,SouthEast
}
/**
*
* @author Дмитрий Соловьев
*/
public class Flight{
Airline carrier;
int number;
Plane plane;
Direction direction;
LocalDateTime time;
boolean status;
double distance;
double hight;
Flight(Plane P, Airline NameCompany, int numb, Direction dir, LocalDateTime t, boolean state, double dist, double hig){ //для посадки
this.plane = P;
this.carrier = NameCompany;
this.number = numb;
this.direction = dir;
this.time = t;
this.status = state;
this.distance = dist;
this.hight = hig;
}
Flight(Plane P, Airline NameCompany, int numb, Direction dir, LocalDateTime t){ //для взлета
this.plane = P;
this.carrier = NameCompany;
this.number = numb;
this.direction = dir;
this.time = t;
this.status = true;
this.distance = 0;
this.hight = 0;
}
String getCarrier(){
return carrier.name();
}
}