hildalange / TDA553-lab1

0 stars 0 forks source link

CRITICAL: MVC: Should be in one of the controllers [lab3] #32

Closed I-Hansson closed 1 year ago

I-Hansson commented 1 year ago

This code should be in one or more of the Controllers, because it is about taking input from the user, not telling the user the state of the model. (Hint; It will be easiest if you make all the code relating to the buttons and spinner into Controllers.)

https://github.com/hildalange/TDA553-lab1/blob/ae6c4d33971f9c05b31e0d6b7de7f90ae1b0bce3/src/java/CarView.java#L32-L40

I-Hansson commented 1 year ago

Det är fortfarande mycket kod som borde ligga i controller men som just nu ligger i viewn. T ex, detta skall ligga i controller. https://github.com/hildalange/TDA553-lab1/blob/3b22b0982efebe50e3ff6343651e5d3ca1da786d/src/java/CarView.java#L67-L117

hildalange commented 1 year ago

Vi har ändrat lite nu och pushat. Ser det OK ut?

I-Hansson commented 1 year ago

Det ser bra ut! Kan vi få in TimeListener in i controllern? https://github.com/hildalange/TDA553-lab1/blob/24da96704e03838001441ccba96018db1bc0cefe/src/java/CarApp.java#L27-L39

johannaavlund commented 1 year ago

hur? kan vi få en hint?