-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestCarre.java
More file actions
42 lines (27 loc) · 818 Bytes
/
TestCarre.java
File metadata and controls
42 lines (27 loc) · 818 Bytes
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
package main.java.com.example;
public class TestCarre {
public static void main(String[] args){
Carre carre = new Carre(5,5 , 3);
System.out.println(carre);
carre.TranslCarreHoriz(4);
System.out.println(carre);
carre.TranslCarreVert(3);
System.out.println(carre);
carre.TranslationCarre(2,5);
System.out.println(carre);
carre.TranslationCarre(1);
System.out.println(carre);
Carre carre2 = new Carre(5,5 , 3);
if(carre==carre2){
System.out.println("equals");
}else{
System.out.println("non equals");
}
System.out.println("Surface : "+carre.Surface());
System.out.println("perimetre : "+carre.perimetre());
System.out.println("diagonale : "+carre.diagonale());
for (Point point: carre.CoinsDuCarre()) {
System.out.println(point);
}
}
}