-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestDronesException.java
41 lines (25 loc) · 1015 Bytes
/
TestDronesException.java
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
public class TestDronesException {
public static void main(String[] arg){
// TEST 1
try {
DroneTerrestre d1 = new DroneTerrestre("Wall-E1", 3); // nom nbRoues
System.out.println(d1);
// TEST 4
try {
Colonie colo2=new Colonie( new Drone[]{d1}, new Terrain());
System.out.println("les déplacements du drone sont : \n " + colo2.getDeplacements("Bizarre"));
}catch (Exception e){System.out.println(e);}
} catch (Exception e){System.out.println(e);}
// TEST 2
try {
DroneAerien d2 = new DroneAerien("Eve1",-2.0f); // nom adresse hauteur
System.out.println(d2);
}catch (Exception e){System.out.println(e);}
// TEST 3
try {
Drone[] drones=null;
Colonie colo = new Colonie(drones, new Terrain());
System.out.println(colo);
}catch (Exception e){System.out.println(e);}
}
}