Closed martinjonsson01 closed 1 year ago
It might be better to put the code involving turbo into its own class which Saab95 inherits from or delegates to. Then we could create a new car with turbo without modifying or duplicating code.
https://github.com/ghazalghorabi/TDA553-lab1/blob/9064245501fc0d8910804f850959c9b46f31d00c/src/Saab95.java#L15-L21
Jag tror att getTurbo() är överflödig nu när ni har turbofactor(), annars ser det exemplariskt ut!
getTurbo()
turbofactor()
https://github.com/ghazalghorabi/TDA553-lab1/blob/9a7bb11cad1ca4ae09a075ccccd54899b74953ad/src/Turbo.java#L12-L14
It might be better to put the code involving turbo into its own class which Saab95 inherits from or delegates to. Then we could create a new car with turbo without modifying or duplicating code.
https://github.com/ghazalghorabi/TDA553-lab1/blob/9064245501fc0d8910804f850959c9b46f31d00c/src/Saab95.java#L15-L21