-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStations.java
More file actions
288 lines (254 loc) · 8.2 KB
/
Copy pathStations.java
File metadata and controls
288 lines (254 loc) · 8.2 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
// --- Stations.java ---
import java.util.Vector;
/**
* Stations gère la liste de toutes les stations du réseau.
*/
public class Stations {
/**
* Retourne la liste complète des stations.
*/
private static Vector<Station> listeStations = new Vector<>();
// Bloc statique : initialisation de toutes les stations
static {
// 1) Ashford Road
listeStations.add(new Station(
1,
"Ashford Road",
new String[]{"🛅 - Consignes", "👤 - Assistance", "♿️🚫 - Pas d'accéssibilité", "ℹ️ - Point d’information"},
52, 39, 0.7884, 'N',
1, 17, 55.4244, 'E'
));
// 2) Brookside Avenue
listeStations.add(new Station(
2,
"Brookside Avenue",
new String[]{"👤 - Assistance"},
52, 38, 52.9512, 'N',
1, 17, 27.276, 'E'
));
// 3) Castle Hill
listeStations.add(new Station(
3,
"Castle Hill",
new String[]{},
52, 38, 55.6116, 'N',
1, 18, 28.4184, 'E'
));
// 4) Dunham End
listeStations.add(new Station(
4,
"Dunham End",
new String[]{},
52, 38, 55.608, 'N',
1, 16, 34.8996, 'E'
));
// 5) Eastbourne West
listeStations.add(new Station(
5,
"Eastbourne West",
new String[]{},
52, 38, 41.1936, 'N',
1, 17, 14.1252, 'E'
));
// 6) Fairfields
listeStations.add(new Station(
6,
"Fairfields",
new String[]{"👤 - Assistance"},
52, 38, 45.9276, 'N',
1, 17, 27.276, 'E'
));
// 7) Grand Central
listeStations.add(new Station(
7,
"Grand Central",
new String[]{"🛒 - Zone commerciale", "🛅 - Consignes", "👤 - Assistance", "🚻 - Toilettes", "ℹ️ - Point d’information"},
52, 38, 25.3716, 'N',
1, 17, 20.5836, 'E'
));
// 8) High Street
listeStations.add(new Station(
8,
"High Street",
new String[]{"🛒 - Zone commerciale"},
52, 38, 38.5332, 'N',
1, 18, 21.4956, 'E'
));
// 9) Ivy Lane
listeStations.add(new Station(
9,
"Ivy Lane",
new String[]{},
52, 38, 37.1328, 'N',
1, 16, 52.2048, 'E'
));
// 10) Jubilee Place
listeStations.add(new Station(
10,
"Jubilee Place",
new String[]{"👤 - Assistance"},
52, 38, 39.336, 'N',
1, 15, 50.832, 'E'
));
// 11) King's Way
listeStations.add(new Station(
11,
"King’s Way",
new String[]{"👤 - Assistance", "♿️🚫 - Pas d'accéssibilité", "ℹ️ - Point d’information"},
52, 38, 21.7608, 'N',
1, 16, 44.13, 'E'
));
// 12) Lakeside
listeStations.add(new Station(
12,
"Lakeside",
new String[]{},
52, 38, 41.1936, 'N',
1, 18, 0.9612, 'E'
));
// 13) Market Place
listeStations.add(new Station(
13,
"Market Place",
new String[]{"🛒 - Zone commerciale", "👤 - Assistance", "♿️🚫 - Pas d'accéssibilité"},
52, 38, 19.77, 'N',
1, 17, 47.8104, 'E'
));
// 14) Northgate Shopping Centre
listeStations.add(new Station(
14,
"Northgate Shopping Centre",
new String[]{"🛒 - Zone commerciale", "👤 - Assistance"},
52, 38, 23.712, 'N',
1, 18, 26.5716, 'E'
));
// 15) Oakwoods
listeStations.add(new Station(
15,
"Oakwoods",
new String[]{},
52, 38, 16.5516, 'N',
1, 16, 58.404, 'E'
));
// 16) Parkside Place
listeStations.add(new Station(
16,
"Parkside Place",
new String[]{},
52, 38, 17.1132, 'N',
1, 16, 23.5956, 'E'
));
// 17) Queensbridge
listeStations.add(new Station(
17,
"Queensbridge",
new String[]{},
52, 38, 1.0104, 'N',
1, 16, 42.9744, 'E'
));
// 18) Riverside
listeStations.add(new Station(
18,
"Riverside",
new String[]{},
52, 37, 57.0864, 'N',
1, 16, 24.5172, 'E'
));
// 19) Southbank Place
listeStations.add(new Station(
19,
"Southbank Place",
new String[]{"🛒 - Zone commerciale", "♿️🚫 - Pas d'accéssibilité"},
52, 37, 55.3368, 'N',
1, 17, 18.9708, 'E'
));
// 20) Town Hall
listeStations.add(new Station(
20,
"Town Hall",
new String[]{},
52, 38, 14.4528, 'N',
1, 17, 18.9708, 'E'
));
// 21) Union Street
listeStations.add(new Station(
21,
"Union Street",
new String[]{"👤 - Assistance"},
52, 37, 59.3292, 'N',
1, 17, 44.2572, 'E'
));
// 22) Victoria Docks
listeStations.add(new Station(
22,
"Victoria Docks",
new String[]{"🛅 - Consignes", "👤 - Assistance", "🚻 - Toilettes"},
52, 38, 7.17, 'N',
1, 18, 0.0396, 'E'
));
// 23) Waterfront
listeStations.add(new Station(
23,
"Waterfront",
new String[]{},
52, 37, 57.2268, 'N',
1, 17, 56.8068, 'E'
));
// 24) Xenobiotics Research Center
listeStations.add(new Station(
24,
"Xenobiotics Research Center",
new String[]{},
52, 38, 9.2688, 'N',
1, 18, 21.9384, 'E'
));
// 25) York Road
listeStations.add(new Station(
25,
"York Road",
new String[]{},
52, 38, 6.3312, 'N',
1, 16, 10.6752, 'E'
));
// 26) Zephyr Close
listeStations.add(new Station(
26,
"Zephyr Close",
new String[]{},
52, 39, 5.4108, 'N',
1, 16, 48.0504, 'E'
));
}
/** Affiche la liste des stations (ordre normal). */
public static Vector<Station> getListeStations() {
return listeStations;
}
/**
* Affiche toutes les stations (ID + Nom) dans la console.
*/
public static void listerToutesLesStations() {
for (Station s : listeStations) {
System.out.println(s.toString());
}
}
/** Affiche la liste des stations (ordre inverse). */
public static void listerToutesLesStationsInverse() {
for (int i = listeStations.size() - 1; i >= 0; i--) {
System.out.println(listeStations.get(i).toString());
}
}
/**
* Affiche les informations détaillées d'une station en fonction de son identifiant.
*
* @param identifiant Identifiant de la station.
*/
public static void afficherInformationsStation(int identifiant) {
for (Station s : listeStations) {
if (s.getIdentifiant() == identifiant) {
System.out.println(s.informationsDetaillees());
return;
}
}
System.out.println("Aucune station ne correspond à l'ID : " + identifiant);
}
}