Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Graphique2D {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- // Création de point
- Point p;
- p = Point.creerPt();
- // Déplacer un point
- System.out.println("Entrer décalage abscisse");
- float dx=Lire.f();
- System.out.println("Entrer décalage ordonnée");
- float dy=Lire.f();
- p.deplacer(dx, dy);
- System.out.println("Nouvelles coordonnées");
- p.afficher();
- // Créer un segment
- Segment S;
- S = Segment.creerS();
- // Demander longueur segment
- double l;
- l = S.longueur();
- System.out.println( "Longueur du segment : " + l);
- // Créer une polyligne
- Polyligne Pl;
- Pl = Polyligne.creerPl();
- // Créer un polygone
- // Polygone Pg;
- // Pg = Polygone.creerPg();
- // Demander longueur polyligne
- double L;
- L = Pl.longueurPoly();
- System.out.println("Longueur de la polyligne : "+ L);
Add Comment
Please, Sign In to add comment