I have a ArrayList
of clients and I have to find a client by name and compare his debt with another value to know if he can buy or not. This is my code. It tells me that the method.getName is not defined and that it can not resolve DEBT. Would someone give me some guidance on how to do this right?
Thanks and regards!
public void generarFactura(int IMPORTE){
String NOMBRECLIENTE;
Scanner sc=new Scanner(System.in);
System.out.println("Inserte el nombre del cliente que desea hacer una compra");
NOMBRECLIENTE= sc.nextLine();
//aca recorreria el arraylist y verificaria que el cliente este, y que su deuda sea
//menor a 4000$ para ahi pasar a emitir factura
int i=0;
for (i=0;i<((CharSequence) listaClientes).length();i++) {
if (listaClientes.getNombre().equals(NOMBRECLIENTE)){
if(listaClientes.DEUDA<4000){
//creo el objeto factura y le doy valores random
Factura facturacliente=new Factura(3000, 7, 8);
}else{
System.out.println("El cliente acumulo demasiada deuda");
}
}
}