forked from PlanesWithBrains/PlaneGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlane.java
More file actions
executable file
·39 lines (33 loc) · 1.17 KB
/
Plane.java
File metadata and controls
executable file
·39 lines (33 loc) · 1.17 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
package sample;
import java.util.ArrayList;
/**
*
* @author Дмитрий Соловьев
*/
public class Plane {
String name;
int lengthRunway;
int countPassangers;
Plane(String Name, int LengthRun, int CountPass){
this.name = Name;
this.lengthRunway = LengthRun;
this.countPassangers = CountPass;
}
static ArrayList<Plane> getPlanes(){
ArrayList<Plane> temp = new ArrayList<>();
//Имя, вес, кр. скорость, длина разбега, число мест
temp.add(new Plane("A310",1900,280));
temp.add(new Plane("A320",2090,180));
temp.add(new Plane("A330",2500,440));
temp.add(new Plane("A380",2050,853));
temp.add(new Plane("Boeing-737",2241,189));
temp.add(new Plane("Boeing-747",2180,660));
temp.add(new Plane("Boeing-757",2550,279));
temp.add(new Plane("Boeing-767",3400,375));
temp.add(new Plane("Boeing-777",3700,550));
temp.add(new Plane("Ил-62",3150,186));
temp.add(new Plane("Ил-86",2800,350));
temp.add(new Plane("Ту-154",2300,180));
return temp;
}
}