lunduniversity / introprog

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

bank examples use IDs that don't fit in the specified data type #235

Closed jos-rosenqvist-3812 closed 7 years ago

jos-rosenqvist-3812 commented 7 years ago

The examples in the bank project use IDs that are written like Swedish personal identity numbers, e.g. 6707071234. Many such IDs (in particular, the ones for people born between 1922 and 1999) are too large to fit in Ints, but the specification of Customer says that IDs need to be stored as Ints.

bjornregnell commented 7 years ago

A very relevant issue. Better to store them as Long. PR welcome ;)

bjornregnell commented 7 years ago

But on the other hand maybe better to wait to fix this. Bank probably needs a complete redesign from scratch....

jos-rosenqvist-3812 commented 7 years ago

@bjornregnell Have we decided yet whether we should redesign bank? There are only a few weeks left until the new compendiums are going to be printed...

bjornregnell commented 7 years ago

I'm unsure if I'll make it as I'm swamped. If you see easy fixes PR:s are welcome. I guess a complete re-design is not feasible for me given my work load until printing deadline; so feel free to polish it in whatever direction you find feasible an provide PR:s if possible...

jos-rosenqvist-3812 commented 7 years ago

I'll try to make the instructions clearer and fix errors like this one, then. I'll avoid changing the number of things that need to be implemented since I don't know what reductions could be appropriate for that, but I suppose it's not too much of an issue for the bank project to have a higher difficulty level than the other projects as long as we make that clear to the students (unlike last year).