-
Notifications
You must be signed in to change notification settings - Fork 8
Tras añadir clase abstracta VehiculoConRuedas #1
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
base: main
Are you sure you want to change the base?
Conversation
src/vehiculos/Coche.java
Outdated
|
|
||
| private int numeroDeRuedas; | ||
| private String matricula; | ||
| private String matricula = "7777 BBB"; |
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 magic number no se puede poner ya
src/vehiculos/Coche.java
Outdated
| return true; | ||
| } | ||
|
|
||
|
|
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.
Estos espacios verticales sobran
|
|
||
| public class Ejemplo { | ||
|
|
||
| public static void main(String[] args) { |
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.
Limpia ya el main para que haga lo que quieres y que no vaya conviertiéndose en un cementerio de código viejo comentado
src/vehiculos/Moto.java
Outdated
| super(modelo, color); | ||
| } | ||
|
|
||
| public Moto() { |
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.
Ojo con la indentación. Revísa que esté todo bien formateado antes de subir. Puede que en tu Eclipse se vea bien porque trate igual los espacios y los tabuladores, pero mira cómo queda en github
src/vehiculos/Vehiculo.java
Outdated
| return (getModelo() == null ? MODELO_NO_DISPONIBLE : getModelo()) | ||
| // return getModelo() | ||
| + " (" + color + ") " + modelo; | ||
| return modelo + " (" + getColor() + ")"; |
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.
Prefería que se viese otra forma de hacerlo controlando el getter
| public VehiculoConRuedas(String modelo, String color) { | ||
| super(modelo, color); | ||
| } | ||
| @Override |
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.
Falta antes un espacio vertical
|
Te he hecho unos comentarios para que mejores el código. |
joseluispuentes82
left a comment
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.
Cambios
- He corregido los detalles que me has sugerido.
- Como había avanzado con el blog y había implementado alguna interfaz también las he compartido.
- he borrado mucho codigo viejo, que guardaba por defecto...
No description provided.