2
« en: 18 de Septiembre 2019, 17:33 »
Hola buenos días, estoy trabajando en un proyecto de clase y necesito ayuda con la creación del método "Eliminar Cliente", quisiera que me explicaran y ayudaran a hacer el método.
Estas son las clases que tengo.
Clase Persona
package objectos;
public class Persona {
private String id;
private String firstName;
private String secondName;
private String firstLastName;
private String secondLastName;
private String phoneNumber;
private String adress;
private String email;
private String sex;
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the firstName
*/
public String getFirstName() {
return firstName;
}
/**
* @param firstName the firstName to set
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/**
* @return the secondName
*/
public String getSecondName() {
return secondName;
}
/**
* @param secondName the secondName to set
*/
public void setSecondName(String secondName) {
this.secondName = secondName;
}
/**
* @return the firstLastName
*/
public String getFirstLastName() {
return firstLastName;
}
/**
* @param firstLastName the firstLastName to set
*/
public void setFirstLastName(String firstLastName) {
this.firstLastName = firstLastName;
}
/**
* @return the secondLastName
*/
public String getSecondLastName() {
return secondLastName;
}
/**
* @param secondLastName the secondLastName to set
*/
public void setSecondLastName(String secondLastName) {
this.secondLastName = secondLastName;
}
/**
* @return the phoneNumber
*/
public String getPhoneNumber() {
return phoneNumber;
}
/**
* @param phoneNumber the phoneNumber to set
*/
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
/**
* @return the adress
*/
public String getAdress() {
return adress;
}
/**
* @param adress the adress to set
*/
public void setAdress(String adress) {
this.adress = adress;
}
/**
* @return the email
*/
public String getEmail() {
return email;
}
/**
* @param email the email to set
*/
public void setEmail(String email) {
this.email = email;
}
/**
* @return the sex
*/
public String getSex() {
return sex;
}
/**
* @param sex the sex to set
*/
public void setSex(String sex) {
this.sex = sex;
}
}
Clase Cliente
package objectos;
public class Cliente extends Persona {
public static void remove(int i) {
}
private boolean credito;
private int limiteCredito;
private int plazo;
private String accountNumber;
/**
* @return the credito
*/
public boolean isCredito() {
return credito;
}
/**
* @param credito the credito to set
*/
public void setCredito(boolean credito) {
this.credito = credito;
}
/**
* @return the limiteCredito
*/
public int getLimiteCredito() {
return limiteCredito;
}
/**
* @param limiteCredito the limiteCredito to set
*/
public void setLimiteCredito(int limiteCredito) {
this.limiteCredito = limiteCredito;
}
/**
* @return the plazo
*/
public int getPlazo() {
return plazo;
}
/**
* @param plazo the plazo to set
*/
public void setPlazo(int plazo) {
this.plazo = plazo;
}
/**
* @return the accountNumber
*/
public String getAccountNumber() {
return accountNumber;
}
/**
* @param accountNumber the accountNumber to set
*/
public void setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
}
}
Añadiré el principal en la respuesta.