JAVA constructors (I'm about to smash my computer with a baseball bat)
<p>Okay, I'm really frustrated here.  I am taking the second part of my Intro to Programming class this semester.  We did C++ last semester and now we're doing JAVA.  We have jumped into everything rather quickly in my opinion.  I believe this is because we're expected to apply our knowledge of C++ to JAVA since they are somewhat similar.  I guess this makes sense.  I'm just mad right now because I've been scouring Google, etc in an attempt to understand.</p>

<p>There are two files/classes - RectangleDemo and Rectangle.  RectangleDemo is the main.
We were asked to write code that could calculate area and perimeter.  My problem is this.
When I add a new constructor my original class and its object in 'RectangleDemo' now doesn't work.  Furthermore, my compiler cannot find the symbol for the new constructor.</p>

<p>heres the code...</p>

<pre><code>public class RectangleDemo {
    public static void main(String[] args) {
        Rectangle myRect = new Rectangle();

        double theArea;
        double thePerimeter;

        myRect.setLength(25);
        myRect.setWidth(5);

        theArea = myRect.area();

        thePerimeter = myRect.perim();

        System.out.println("My rectangle has area " + theArea);
        System.out.println("Rectangle Perimiter " + thePerimeter);

        Rectangle newRect = new Rectangle(10, 20);

    }
}

public class Rectangle {

    private double width, length;
    private double len, wid;

    public void setWidth(double w) {
        width = w;
    }

    public void setLength(double ln) {
        length = ln;
    }

    public double getWidth() {
        return width;
    }

    public double getLength() {
        return length;
    }

    public double area() {
        double a;
        a = length * width;
        return a;
    }

    public double perim() {
        double pr;
        pr = (length * 2) + (width * 2);
        return pr;
    }

    public Rectangle(double len, double wid) {
    }
}
</code></pre>

<p>Sorry about the code blocks, indent is a bit weird for me in Safari.</p>

<p>The 'Rectangle' class compiles without error.</p>

<p>but the 'RectangleDemo' class compiler error is this.</p>

<pre><code> ----jGRASP exec: javac -g RectangleDemo.java
RectangleDemo.java:5: cannot find symbol
symbol  : constructor Rectangle()
location: class Rectangle
        Rectangle myRect = new Rectangle ();
</code></pre>

<p>I'm compiling on an 07 Macbook running OSX 10.7.5</p>

<p>I haven't added anything to the constructor's code yet because I can't even get the program to find it without error.</p>

<p>All the reading I've been doing has been helpful to me learning more about JAVA but I'm at my wits end with this program.  To make things worse, I bet its just a stupid, little typo on my part.</p>
