# HG changeset patch # User Christian Urban # Date 1667469311 0 # Node ID 4c3d14a99441fa7913a7732ee8eca8c3d99dfee8 # Parent 2a0ddb392d2b01f21e8409b8e96156ca218e6c0c updated jars diff -r 2a0ddb392d2b -r 4c3d14a99441 core_templates1/collatz.jar Binary file core_templates1/collatz.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 core_templates2/docdiff.jar Binary file core_templates2/docdiff.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 core_templates3/postfix.jar Binary file core_templates3/postfix.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 core_templates3/postfix2.jar Binary file core_templates3/postfix2.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 cws/main_cw01.pdf Binary file cws/main_cw01.pdf has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 cws/main_cw01.tex --- a/cws/main_cw01.tex Wed Nov 02 21:49:42 2022 +0000 +++ b/cws/main_cw01.tex Thu Nov 03 09:55:11 2022 +0000 @@ -206,7 +206,13 @@ \end{verbatim} as profit for that year, and our new balance for 2011 is \$125 when - converted to a \texttt{Long}.\mbox{}\hfill\mbox{[1 Mark]} + converted to a \texttt{Long}. Since \texttt{yearly\_yield} should + produce a \texttt{Long}, there are a number of ways how to round + doubles. One way to do the calculation is to calculate the profit + first as \texttt{Double}, and then round the result down to a \texttt{Long} + (using \texttt{.toLong}) and add it to the balance (which is also a + \texttt{Long}).\\ + \mbox{}\hfill\mbox{[1 Mark]} \item[(7)] Write a function that calculates the overall balance for a range of years where each year the yearly profit is compounded to @@ -237,9 +243,9 @@ of companies that went bust or were de-listed over the years. So where does this leave our fictional character Mr T.~Drumb? Well, given his inheritance, a really dumb investment strategy would have done -equally well, if not much better. And one would assume this guy is -by now locked up in prison and the key thrown away, but alas he -is still around annoying commonsense people.\medskip +equally well, if not much better. Anyhow, one would assume that this +guy is by now locked up in a prison and the key thrown away, but alas he +is still around annoying commonsense people. What a pity.\medskip \end{document} diff -r 2a0ddb392d2b -r 4c3d14a99441 main_templates1/drumb.jar Binary file main_templates1/drumb.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 main_templates2/wordle.jar Binary file main_templates2/wordle.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 main_templates3/re.jar Binary file main_templates3/re.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 main_templates4/README.md --- a/main_templates4/README.md Wed Nov 02 21:49:42 2022 +0000 +++ b/main_templates4/README.md Thu Nov 03 09:55:11 2022 +0000 @@ -5,4 +5,5 @@ * reference jar: [knight1.jar](https://nms.kcl.ac.uk/christian.urban/knight1.jar), [knight2.jar](https://nms.kcl.ac.uk/christian.urban/knight2.jar), - [knight3.jar](https://nms.kcl.ac.uk/christian.urban/knight3.jar) \ No newline at end of file + [knight3.jar](https://nms.kcl.ac.uk/christian.urban/knight3.jar), + [knight4.jar](https://nms.kcl.ac.uk/christian.urban/knight4.jar) \ No newline at end of file diff -r 2a0ddb392d2b -r 4c3d14a99441 main_templates4/knight1.jar Binary file main_templates4/knight1.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 main_templates4/knight2.jar Binary file main_templates4/knight2.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 main_templates4/knight3.jar Binary file main_templates4/knight3.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 main_templates4/knight4.jar Binary file main_templates4/knight4.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 main_templates5/bf.jar Binary file main_templates5/bf.jar has changed diff -r 2a0ddb392d2b -r 4c3d14a99441 main_templates5/bfc.jar Binary file main_templates5/bfc.jar has changed