Beruflich Dokumente
Kultur Dokumente
package herencia;
package herencia;
this.x=x;this.y=y;this.r=r;
numCirculos++;
this(0.0,0.0,r);
}
public Circulo(Circulo c ){
this(c.x,c.y,c.r);
public Circulo(){
this(0.0,0.0,1.0);
return 2.0*PI*r;
return PI*r*r;
if(this.r>= c.r){
return this;
}else return c;
}
}
package herencia;
public Rectangulo ( double p1x, double p1y , double p2x , double p2y){
x1 = p1x;
x2 = p2x;
y1 = p1y;
y2 = p2y;
numRectangulos ++;
public Rectangulo(){this(2,3,1.0,1.0);}
return 2.0*((x1-x2)+(y1-y2));
return (x1-x2)*(y1-y2);
}
package herencia;
for(int i=0;i<c.length;i++){
/*int k=1;
for(int i=0;i<c.length;i++){
if(c[i] == c[i].elMayor(c[k])){
pos = i;
}else pos= kg ;
*/
for(int i=0;i<r.length;i++){
RESULTADO
run:
nElementos = listaActual.length;
lista[i]= listaActual[i];
nElementos ++;
if (listaActual.length == 0)return;
int k=0;
nElementos = listaActual.length;
for(int i=0;i<nElementos;i++){
if(listaActual[i]!= null){
lista[k++]=listaActual[i];
nElementos--;
}
public CLista(){
nElementos=0;
// metodos public
lista[i]= Objeto;
else
return lista[i];
else {
return null;
return nElementos;
unElementomas(lista);
ponerValorEn(nElementos -1 , Objeto);
for(int i=0;i<nElementos;i++){
if(lista[i].obtenerIdLibro()==Id){
unElementomenos(lista);
return true;
return false;
String titulo;
titulo = lista[i].obtenerTitulo();
if(titulo==null) continue;
if(titulo.indexOf(str)>-1)
return i;
return -1;
}
package Arreglos;
String Id;
String Titulo;
return Id;
return Titulo;