Blame view

tp1_rectangle/tp1/rectangles/ApplicationRectangle.java 498 Bytes
f98eb12b   Vincent Benoist   tp1Fini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  import java.awt.geom.*;
  
  public class ApplicationRectangle{
  
      public static void main(String[] args){
          Rectangle rectangle = new Rectangle(10.0,10.0,40.0,50.0);
          System.out.println(rectangle.toString());
          
          if(args.length>3){
              Rectangle rectangle2 = new Rectangle(Double.parseDouble(args[0]),Double.parseDouble(args[1]),Double.parseDouble(args[2]),Double.parseDouble(args[3]));
              System.out.println(rectangle2.toString());
          }
      }
      
  }