title: Size comparisons (circumference/square perimeter) etc
body: <p>3 diffrent <code>classes</code> 1 for handling <code>Circle</code> isntances ,1 for <code>Square</code> instances and the 3rd for <code>comparrisons</code> between them(<code>main</code>) . In the <code>main</code> function i find the <code>circle</code> (between <code>c1..c4</code>) and <code>square</code> (between <code>s1...s5</code>) and print the <code>biggest circumference and area of them respectively</code>.[so circle-circle and square-square comparison]</p>
  
  <p><strong><em>!!!! NOTE :</em></strong> Only the ones with the biggers radius or sides have the biggest circumference or area , so i only use <code>r</code> and <code>a</code> for comparisons.i dont know if its possible to return <code>this</code> if i use the <code>area</code>/<code>circumference</code> method(no , cause then i will only handle numbers ?).Correct me please.</p>
  
  <p>Now i want to print the characteristics(x,y,r/a) of the <code>geometric shape</code> (circle/square) with the <code>biggest perimeter</code>. How can i do this ? Where do i compare?New class?[square-circle comparison]</p>
  
  <pre><code>public class Circle {
          public double x,y,r;
          public double circumference() {
              return 2*(3.14)*r;
          }
          public double area() {
              return 3.14*r*r;
          }
          public Circle bigger(Circle c){
              if(c.r&gt;r) return c; else return this; 
          } 
          public Circle(double x, double y, double r) {
              this.x=x; 
              this.y=y; 
              this.r=r;
          }
      }
  
  public class Square {
      public double x,y,a;
      public double perimeter() {
          return 4*a;
      }
      public double area() {
          return a*a;
      }
      public Square bigger(Square s){
          if(s.a&gt;a) return s; else return this; 
      } 
      public Square(double x, double y, double a) {
          this.x=x; 
          this.y=y; 
          this.a=a;
      }
  }
  
  public class CircleAndSquareTest {
  
      public static void main(String[] args) {
          Circle c1 = new Circle(0.0,0.0,1.0);
          Circle c2 = new Circle(1.0,0.0,2.0);
          Circle c3 = new Circle(0.0,2.0,4.0);
          Circle c4 = new Circle(1.0,3.0,1.0);
          Circle cb = c1.bigger(c2).bigger(c3).bigger(c4);
          System.out.println("The circle with the biggest circumference has:\n");
          System.out.println("x-axis value: " + cb.x + " y-axis value: " + cb.y + " radius: " + cb.r+"\n");
  
          Square s1 = new Square(0.0,0.0,1.0);
          Square s2 = new Square(0.0,0.0,1.0);
          Square s3 = new Square(0.0,0.0,5.0);
          Square s4 = new Square(4.0,2.0,2.0);
          Square s5 = new Square(0.0,0.0,1.0);
          Square sb = s1.bigger(s2).bigger(s3).bigger(s4).bigger(s5);
          System.out.println("The square with the biggest area has:\n");
          System.out.println("x-axis value: " + sb.x + " y-axis value: " + 
          sb.y + " side: " + sb.a);
      }
  }
  </code></pre>