Repository navigation
Expand file tree
/
Copy pathPlane_Crash.java
More file actions
152 lines (126 loc) · 4.03 KB
/
Copy pathPlane_Crash.java
File metadata and controls
152 lines (126 loc) · 4.03 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
class Plane_Crash {
private String Date;
private String Time;
private String Location;
private String Operator;
private String Flight;
private String Route;
private String Type;
private String Registration;
private String cn_In;
private String Aboard;
private String Fatalities;
private String Ground;
private String Survivors;
private String SurvivalRate;
private String Summary;
private String ClustID;
private int first_date;
private int second_date;
private int third_date;
private int first_time;
private int second_time;
public Plane_Crash(String date, String time, String location, String operator, String flight, String route,
String type, String registration, String cn_In, String aboard, String fatalities, String ground,
String survivors, String survivalRate, String summary, String clustID) {
this.Date = date;
this.Time = time;
this.Location = location;
this.Operator = operator;
this.Flight = flight;
this.Route = route;
this.Type = type;
this.Registration = registration;
this.cn_In = cn_In;
this.Aboard = aboard;
this.Fatalities = fatalities;
this.Ground = ground;
this.Survivors = survivors;
this.SurvivalRate = survivalRate;
this.Summary = summary;
this.ClustID = clustID;
String[] arr = Date.split("/");
this.first_date = Integer.valueOf(arr[0]);
this.second_date = Integer.valueOf(arr[1]);
this.third_date = Integer.valueOf(arr[2]);
if (!Time.equals("")) {
String[] arr_2 = Time.split(":");
this.first_time = Integer.valueOf(arr_2[0]);
this.second_time = Integer.valueOf(arr_2[1]);
} else {
this.first_time = 0; // default value for hour
this.second_time = 0; // default value for minute
}
}
public String getDate() {
return Date;
}
public String getTime() {
return Time;
}
public String getLocation() {
return Location;
}
public String getOperator() {
return Operator;
}
public String getFlight() {
return Flight;
}
public String getRoute() {
return Route;
}
public String getType() {
return Type;
}
public String getRegistration() {
return Registration;
}
public String getCn_In() {
return cn_In;
}
public String getAboard() {
return Aboard;
}
public String getFatalities() {
return Fatalities;
}
public String getGround() {
return Ground;
}
public String getSurvivors() {
return Survivors;
}
public String getSurvivalRate() {
return SurvivalRate;
}
public String getSummary() {
return Summary;
}
public String getClustID() {
return ClustID;
}
public int getFirstDate() {
return first_date;
}
public int getSecondDate() {
return second_date;
}
public int getThirdDate() {
return third_date;
}
public int getFirstTime() {
return first_time;
}
public int getSecondTime() {
return second_time;
}
public String toString() {
return "[ " + "Date: " + this.Date + ", Time: " + this.Time + ", Location: " + this.Location + ", Operator: "
+ this.Operator + ", Flight: " + this.Flight + ", Route: " + this.Route + ", Type: " + this.Type
+ ", Registration: " + this.Registration + ", cn_In: " + this.cn_In + ", Aboard: " + this.Aboard
+ ", Fatalities: " + this.Fatalities + ", Ground: " + this.Ground + ", Survivors: " + this.Survivors
+ ", Survival Rate: " + this.SurvivalRate + ", Summary: " + this.Summary + ", ClustID: " + this.ClustID
+ " ]";
}
}