Vous êtes sur la page 1sur 1

public class TestCercle {

static final double pi=3.14;


public static void main(String[] args) {
Point p2 = new Point('A',1,1);//A(1,1)
Point p3 = new Point('B',1,2);//B(1,2)
Cercle c1 = new Cercle(3.5,p2);
Cercle c2 = new Cercle();
c1.affiche();
c2.setRayon(3);//attribuer le rayon 3 au cercle c2
c2.setCentre(p3); // choisir le point p3 comme centre de c2
c2.affiche();
Cercle c3=c2.agrandir(3);
c3.affiche();
if(c1.egalite(c2))
System.out.println("2 cercles identiques");
else
System.out.println("2 cercles différents");

Vous aimerez peut-être aussi