lunduniversity / introprog

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

in exercises w05, encourage students to try Pos.moved and reflect over results #679

Closed snctfd closed 1 year ago

snctfd commented 1 year ago

This is a first draft to solve #678. Feedback welcome!

I have not yet managed to compile the compendium to ensure that this looks good.

bjornregnell commented 1 year ago

Thanks!! I can merge and compile after review (currently you need old latex as installed in 20.04 or later or else allslides.tex fails). I will review this soon.

bjornregnell commented 1 year ago

This looks great. It would be good if can add some text with explanation in the subtask solution as well?

bjornregnell commented 1 year ago

Classes don't have methods, only objects and class instances do, strictly speaking... Mabye change this "Reflektera över skillnaden mellan hur man anropar metoder i en klass jämfört med metoder i ett singelobjekt." into a question, such as "Hur skiljer sig anrop till metoder i singelobjekt respektive klassinstanser?"

snctfd commented 1 year ago

Classes don't have methods, only objects and class instances do, strictly speaking...

Good catch - I was a little uncertain as to what the specific terminology should be, I've changed it in accordance with your suggestion.

I've also added an initial draft for an explanation to the solution. Remaining concerns:

bjornregnell commented 1 year ago

LGTM

bjornregnell commented 1 year ago

I will add "[till en referens] till klassen"

snctfd commented 1 year ago

Oh yeah, that makes sense :)

bjornregnell commented 1 year ago

https://github.com/lunduniversity/introprog/commit/603f70d24a0f3692c0a664e996626b66bdd2894f

bjornregnell commented 1 year ago

many thanks for discovering and fixing this!