lunduniversity / introprog

Teaching material for "Introduction to Programming using Scala" at Lund University, LTH. http://cs.lth.se/pgk/
141 stars 167 forks source link

Removed override modifer from exercise in W10 #778

Closed johannesnydahl closed 2 weeks ago

johannesnydahl commented 7 months ago

image The override modifier is not needed in this case because attributes x and y are not implemented in type Pair.

bjornregnell commented 7 months ago

Well, it is still nice to use override so that you get help from the compiler to check if there actually is a thing called that to override...

Or do you have any specific reasons here not NOT use override, other than that it is unnecessary? @johannesnydahl

bjornregnell commented 7 months ago

Perhaps if, as your commit removes override, you could then add another subtask that asks if it works with override and why it is good to use override even if it is not necessary? @johannesnydahl

johannesnydahl commented 7 months ago

@bjornregnell That sounds like a great idea! Will update pull request.

bjornregnell commented 2 weeks ago

I'm merging this as is, but I will change it to include sub-task about override.