UV
¡Error! Nombre de archivo no especificado.
uwe villanueva
To:
eryacame@gmail.com; julinho2202@gmail.com; Aldo Elias Villafuerte
Palacios; cristhiandrang@gmail.com; llanoscubasa@gmail.com; bbruno2672@gmail.com; Jezer aguirre
moya; saint_shur4@hotmail.com; Miguel Angel Condezo
Espìnoza; jordan.torres@hotmail.es; cesar96sr@gmail.com; jesus_pizarro998@hotmail.com; david_19_
1997@hotmail.com; kennyxz2397_rg@hotmail.com; 777 lyzork
777; juanquimata@gmail.com; andre_menes27@hotmail.com
View less
/**
*
* @author SaLa2-PROFESOR
*/
public class Contacto {
/**
* @return the nombre
*/
public String getNombre() {
return nombre;
}
/**
* @param nombre the nombre to set
*/
public void setNombre(String nombre) {
this.nombre = nombre;
}
/**
* @return the direccion
*/
public String getDireccion() {
return direccion;
}
/**
* @param direccion the direccion to set
*/
public void setDireccion(String direccion) {
this.direccion = direccion;
}
/**
* @return the codigo
*/
public int getCodigo() {
return codigo;
}
/**
* @param codigo the codigo to set
*/
public void setCodigo(int codigo) {
this.codigo = codigo;
}
/**
* @return the telefono
*/
public String getTelefono() {
return telefono;
}
/**
* @param telefono the telefono to set
*/
public void setTelefono(String telefono) {
this.telefono = telefono;
}
}
================================================
package clase23octubre;
import java.util.ArrayList;
Agenda(ArrayList<Contacto> agx){
this.ag = agx;
}
this.ag.add(x);
}
if(this.ag.remove(x)==true){
return 1;
}
}
}
return 0;
}
void mostrarContactos(){
for(Contacto x: this.ag){
System.out.println(x.getNombre() + " " +x.getTelefono());
}
}
}
====================================================
/**
*
* @author SaLa2-PROFESOR
*/
public class Clase23Octubre {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Contacto alumnoFiee = new Contacto("Cesar","Lima",51,"777");
ArrayList<Contacto> claseUNI = new ArrayList<Contacto>();
claseUNI.add(alumnoFiee);
claseUNI.add(new Contacto("jezer","Collique",51,"7777"));