Writing class method for test class
<pre><code>public class CirclTest{
    public static void main(String[] args){
        Circle first=new Circle('R',3.0);

        Circle first=new Circle('R',3.0);

        Circle second=new Circle();

        System.out.println("first's radius is " + first.getRadius());

        System.out.println("first's area is " + first.getArea());
        System.out.println("second's area is " + second.getArea());

        if(first.hasLargerAreaThan(20)){
            System.out.println("first's area is larger than 20. ");
        }else{
            System.out.println("first's area is smaller than 20. ");
        }
    }
}
</code></pre>

<p>So i am supposed to write a circle class.This is what i have done.</p>

<pre><code>public class Circle{
    private double radius=0.0;
    private double area=0.0;
    private char colour=' ';

    public Circle(char colour,double radius){
        this.colour=colour;
        this.radius=radius;
    }

    public Circle(){
        radius=0;
        colour='B';
    }


    public char getColour(){
        return colour;
    }
    public double getRadius(){
        return radius;
    }

    public double getArea(){
        return area;
    }


    }
</code></pre>

<p>I am actually confused on how to write a class.Like i know i need to initialize the variables by private etc.And i need to build a constructor but somehow this code above does not work.the test method is correct.But i have to use it to implement my class.</p>
