Commit inicial
This commit is contained in:
parent
f52ff6ecd5
commit
d50346156e
@ -79,7 +79,6 @@ public class AppConcesionario {
|
||||
}
|
||||
|
||||
private void actualizarCoche() {
|
||||
System.out.println("#########################################");
|
||||
System.out.println("ACTUALIZAR COCHE");
|
||||
System.out.println("#########################################");
|
||||
|
||||
|
||||
@ -41,7 +41,8 @@ public class CocheDaoArray implements ICocheDAO {
|
||||
Coche cocheActualizado = null;
|
||||
|
||||
for (int i = 0; i < listaCoches.size(); i++) {
|
||||
if (listaCoches.get(i).getIdentificador() == coche.getIdentificador()) {
|
||||
Coche cocheLista= listaCoches.get(i);
|
||||
if (cocheLista.getIdentificador() == coche.getIdentificador()) {
|
||||
listaCoches.set(i, coche);
|
||||
cocheActualizado = coche;
|
||||
break;
|
||||
@ -52,7 +53,6 @@ public class CocheDaoArray implements ICocheDAO {
|
||||
|
||||
@Override
|
||||
public Coche crearCoche(Coche coche) {
|
||||
// Opcional: comprobar que no exista el ID
|
||||
listaCoches.add(coche);
|
||||
return coche;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user