Ya estoy inscrito ¿Todavía no tienes acceso? Nuestros Planes
Ya estoy inscrito ¿Todavía no tienes acceso? Nuestros Planes
1
respuesta

About: Class Gerente, Methodo "iniciarSesion"

I think that the method "iniciarSesion" could be improved without hardcoding. Thecould would be something like this:

public boolean iniciarSesion(String clave) {
        return this.clave == clave;
}

So , in this way it´s compared between a value recieved by the "iniciarSesion" method and the setted value in the attribute clave.

Instructor, correct me if I´m wrong.

Greetings!!!!

1 respuesta

Hello Gustavo, I hope you are very well.

Congratulations on your learning. We are prioritizing the forum to post doubts, thus we optimize the response time for you.

In order not to stop sharing the codes, activities and exercises that you do, we created a channel on Discord (#compartatcode) where you can share them, give and suggest improvements with the rest of your colleagues.

All the best.

If this post helped you please , mark as fixed ✓. Continue with your studies