Q:

Set method for java not working

So for my assignment it needs to look like this: Assignment
The problem I am facing with this is the setIndent isn't setting the indent but when I mainly change int indent = 20; it will add the indent to the boxes. Also I am confused as to why Rectangle@6bdf28bb is appearing in my code.
Here is my code for the assignment.
Client
// Use this client to help test your Rectangle class for Lab13
// Download it into the same folder as your Rectangle.java file.
// Add other tests if you want to.
public class RectangleClient {
  public static void main( String[] args ) {

     Rectangle box1 = new Rectangle( 4, 5 );
     box1.setIndent(-1);

     System.out.println( box1 );
     Rectangle box2 = new Rectangle( 6, 12, '+', 'X' );
     box2.setIndent( 5 );
     System.out.println( box2 );
     Rectangle box3 = new Rectangle( 11, 20, '$', 'o' );
     box3.setIndent( 20 );
     System.out.println( box3 );
  }
}

Class
//Using rectangle class to test

public class Rectangle {
    public double length;
    public double width;
    public char fill = ' ';
    public char pen = '*';
    public int indent;

    //Set variables
    public void setLength(double len){
        if (len <= 0){
            throw new IllegalArgumentException("Invalid length for Rectangle object");
        }
        else{
            length = len;
        }
    }
    public void setWidth(double wid){
        if (wid <=0){
            throw new IllegalArgumentException("Invalid width for Rectangle object");
        }
        else{
            width = wid;
        }
    }
    public void setPen(char c){
        pen = c;
    }
    public void setFill(char c){
        fill = c;
    }
    public void setIndent(int n){
        if (n < 0){
            indent = 0;
        }
        else {
            indent = n;
        }
    }
    //Get variables
    public double getLength(){
        return length;
    }
    public double getWidth(){
        return width;
    }
    public double getIndent(){
        return indent;
    }

    //Main method
    public Rectangle (){
        int count = 0;
        String indents = "";
        String topBottom = "";
        String middle = "";
        String line = "";
        //Creates the indent string
        while (count<indent){
            indents = indents + " ";
            count++;
        }
        //Top boarder and bottom one
        count = 0;
        while (count<width){
            topBottom += pen;
            count++;
        }
        //Fill inside square
        width = width - 2;
        count = 0;
        while (count<width){
            middle += fill;
            count++;
        }
        //Prints square
        line = pen + middle + pen;
        count = 0;
        while (count<length){
            if (count == 0 || count == length - 1){
                System.out.println(indents + topBottom);
                count++;
            }
            else{
                System.out.println(indents + line);
                count++;
            }
        }
    }
    // using default or set fill and boarder      
    public Rectangle (double l, double w){
        int count = 0;
        String indents = "";
        String topBottom = "";
        String middle = "";
        String line = "";
        //Creates the indent string
        while (count<indent){
            indents = indents + " ";
            count++;
        }
        //Top boarder and bottom one
        count = 0;
        while (count<w){
            topBottom += pen;
            count++;
        }
        //Fill inside square
        w = w - 2;
        count = 0;
        while (count<w){
            middle += fill;
            count++;
        }
        //Prints square
        line = pen + middle + pen;
        count = 0;
        while (count<l){
            if (count == 0 || count == l - 1){
                System.out.println(indents + topBottom);
                count++;
            }
            else{
                System.out.println(indents + line);
                count++;
            }
        }
    }
    //To set values without using .setWidth etc  
    public Rectangle (double l, double w, char p, char f){
        int count = 0;
        String indents = "";
        String topBottom = "";
        String middle = "";
        String line = "";
        //Creates the indent string
        while (count<indent){
            indents += " ";
            count++;
        }
        //Top boarder and bottom one
        count = 0;
        while (count<w){
            topBottom += p;
            count++;
        }
        //Fill inside square
        w = w - 2;
        count = 0;
        while (count<w){
            middle += f;
            count++;
        }
        //Prints square
        line = indents + p + middle + p;
        topBottom = indents + topBottom;
        count = 0;
        while (count<l){
            if (count == 0 || count == l - 1){
                System.out.println(topBottom);
                count++;
            }
            else{
                System.out.println(line);
                count++;
            }
        }
    }
}

The error I'm getting is that it is not adding the indents and the random Rectangle@2ff4f00f

A:

You want to move the printing process of your Rectangle outside of the constructor, otherwise it'll always print immediately upon the use of new Rectangle(...), before you're able to use Rectangle#setIndent(int).
You should instead set the Rectangle fields' values with your constructor, and then have a separate method for printing the Rectangle.
For instance, your constructor which is used to define a specific Rectangle with a custom width, length, pen and fill:
public Rectangle(double l, double w, char p, char f) {
    this.length = l;
    this.width = w;
    this.pen = p;
    this.fill = f;
}

This would set the Rectangle instance's fields to the values parsed as arguments when using new Rectangle(...). (Note, you might want to redo your other constructors to comply with this as well).
To visualize it, you could try add the following code to your Rectangle class
@Override
public String toString() {
    return getClass().getSimpleName() + "[w: " + width + "; l: " + length + 
            "; p: " + pen + "; f: " + fill + "; indent: " + indent + "]";
}

And then use the following in your RectangleClient
Rectangle box1 = new Rectangle(4, 5, '+', 'X');
System.out.println(box1);
box1.setIndent(50);
System.out.println(box1);

It should print
Rectangle[w: 5.0; l: 4.0; p: +; f: X; indent: 0]
Rectangle[w: 5.0; l: 4.0; p: +; f: X; indent: 50]

Since we removed the logic for printing the box from the constructor, we should add it somewhere else. With a separate method for printing the Rectangle, you could do something similar to
public void printRectangle() {
    int count = 0;
    String indents = "";
    String topBottom = "";
    String middle = "";
    String line = "";
    // Creates the indent string
    while (count < indent) {
        indents += " ";
        count++;
    }
    // Top boarder and bottom one
    count = 0;
    while (count < this.width) {
        topBottom += this.pen;
        count++;
    }
    // Fill inside square
    this.width = this.width - 2;
    count = 0;
    while (count < this.width) {
        middle += this.fill;
        count++;
    }
    // Prints square
    line = indents + this.pen + middle + this.pen;
    topBottom = indents + topBottom;
    count = 0;
    while (count < this.length) {
        if (count == 0 || count == this.length - 1) {
            System.out.println(topBottom);
            count++;
        } else {
            System.out.println(line);
            count++;
        }
    }
}

This is basically just the logic from your constructor, just with the exception that instead of using the local variables (passed as arguments), we use the Rectangle instance's field values instead (e.g. this.width instead of w).
Maybe your instructor explicitly wanted you to override the #toString() method, and inside the overridden method, you'd have your logic for printing the Rectangle. If that is the case, you'd of course just move the logic from the #printRectangle() to the overridden #toString() method, which would allow you to use System.out.println(box1) (replace the previous sampled #toString() method, of course).
@Override
public String toString() {
    // Logic from #printRectangle() here
}

If you choose to override #toString(), you should not use System.out.println in the logic, but rather build a string, which you'll return at the end of the #toString() logic. You could take a look at StringBuilder for this.

