-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback #1
base: feedback
Are you sure you want to change the base?
Feedback #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu parcial tiene varios puntos para mejorar. Está aprobado pero no es suficiente para promocionar. Saludos.
} | ||
|
||
method modificarIntensidadElevada(nuevaIntensidad) { | ||
Emocion.cambiarIntensidadElevada(nuevaIntensidad) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esto no es código válido.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No se le pueden mandar mensajes a las clases.
Emocion.cambiarIntensidadElevada(nuevaIntensidad) | ||
} | ||
|
||
method vivirEventoEnGrupo(grupo, evento) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Este código no corresponde a las personas.
class Emocion { | ||
var property intensidad | ||
var property intensidadElevada = 50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debería ser única para todas las emociones.
return intensidad >= intensidadElevada | ||
} | ||
method cambiarIntensidadElevada(nuevaIntensidad) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debería ser global a todas las emociones.
//implemento la funcion liberacionAux para no repetir return super() && condicionDeEmocion cada vez que tengo que hacer un overrite en liberarEmocion | ||
object liberacionAux { | ||
method puedeLiberarse(emocion, condicionAdicional) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bien por la intención de no repetir, aunque hay otros mecanismos mejores.
palabrotas.remove(palabrotas.head()) | ||
} | ||
}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El código mal indentado dificulta la lectura.
method liberarse(evento) { | ||
causa = evento.descripcion() | ||
intensidad -= evento.impacto() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repite código (línea 57)
|
||
method liberarse(evento) { | ||
intensidad -= evento.impacto() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otra vez repite.
En este caso, todas las emociones heredan de la clase Emocion, lo que permite compartir y reutilizar el comportamiento común, como la gestión de la intensidad y los eventos vividos. | ||
|
||
Polimorfismo: Permite que objetos de diferentes clases sean tratados como objetos de una clase común. En este caso, cada emoción tiene su propia implementación del método liberarse, pero todas pueden ser manejadas de la misma manera a través de la clase Emocion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No es necesario hablar de clases para tener polimorfismo.
👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to the default branch since the assignment started. Your teacher can see this too.
Notes for teachers
Use this PR to leave feedback. Here are some tips:
For more information about this pull request, read “Leaving assignment feedback in GitHub”.
Subscribed: @franco-lapalma