Posted by: dekchidriver March 27, 2009
JAVA HELP!!!!!
Login in to Rate this Post:     0       ?        
/* Box.java */
public class Box {
private int lenght;
private int width;
private int height;

public Box(int firstParam){
this.lenght = firstParam;
this.width = 0;
this.height = 0;
System.out.println("Line Created");
}

public Box(int firstParam, int secondParam){
this.lenght=firstParam;
this.width=secondParam;
System.out.println("Rectangle Created");
this.height=0;
}

public Box(int firstParam, int secondParam, int thirdParam){
this.lenght=firstParam;
this.width=secondParam;
this.height=thirdParam;
System.out.println("Box Created");
}
/*TestBoxes.java
* Be sure to import the Box.java file or keep it in same folder
* I don't know if this is what you're looking for, but it looks someting like this. You said however application. I dunno abt tht :) sry just tryn to help where
* I can.
*/

public class TestBoxes{
public static void main(String[] args){
Box(10);
Box(10,11);
Box(10,11,12);
}
}
}
Read Full Discussion Thread for this article