PDA

View Full Version : help for this code


aievedrim
02-12-2006, 11:44 AM
class Coordinate {

private int x;
private int y;

public Coordinate(int x, int y){
setCoordinate(x,y);
}

public void setCoordinate(int x, int y){
this.x = x;
this.y = y;
}


public int getX(){
return x;
}

public int getY(){
return y;
}

}



class Rettangolo {
private Coordinate inf;
private Coordinate sup;
private String[][] matrice;

public Rettangolo(Coordinate inf, Coordinate sup, String car){
...
}

public Rettangolo(int larg, int alt, String car){
// Le coordinate di inf (0,0)
...
}

public Rettangolo(int lato, String car){
...
}

public int larghezza(){
...
}

public int altezza(){
...
}

public String toString(){
...
}

public static void CopyAt(Rettangolo r1 ,Rettangolo r2, int x, int y){
...
}

}

__________________________________________________ ________________
please help me to
complete the code and
write a UsoRettangolo code with the main (only the main)
:rolleyes: