| author | Christian Urban <christian.urban@kcl.ac.uk> |
| Fri, 12 Sep 2025 10:36:07 +0100 | |
| changeset 495 | b47879225270 |
| parent 494 | 253d1ccb65de |
| permissions | -rw-r--r-- |
| 335 | 1 |
\newcommand{\IMPORTANT}[1]{%
|
2 |
\subsubsection*{Important\alert}
|
|
| 166 | 3 |
|
4 |
\begin{itemize}
|
|
| 335 | 5 |
\item #1 |
| 166 | 6 |
\item Make sure the files you submit can be processed by just calling\\ |
| 474 | 7 |
\mbox{\texttt{scala-cli compile <<filename.scala>>}} on the command line.\footnote{All
|
| 424 | 8 |
major OSes, including Windows, have a command line. So there is no |
| 471 | 9 |
good reason to not download scala-cli, install it and run it on your |
| 166 | 10 |
own computer. Just do it!} Use the |
11 |
template files provided and do not make any changes to arguments of |
|
12 |
functions or to any types. You are free to implement any auxiliary |
|
13 |
function you might need. |
|
14 |
||
| 212 | 15 |
\item \textbf{Do not leave any test cases running in your code because this might slow
|
| 237 | 16 |
down your program!} Comment out test cases before submission, otherwise you |
| 199 | 17 |
might hit a time-out. |
18 |
||
| 166 | 19 |
\item Do not use any mutable data structures in your |
20 |
submissions! They are not needed. This means you cannot create new |
|
21 |
\texttt{Array}s or \texttt{ListBuffer}s, for example.
|
|
22 |
||
23 |
\item Do not use \texttt{return} in your code! It has a different
|
|
| 278 | 24 |
meaning in Scala than in Java. It changes the meaning of your program, |
25 |
and you should never use it. |
|
| 166 | 26 |
|
|
428
cdfa6a293453
updated solutions and templates
Christian Urban <christian.urban@kcl.ac.uk>
parents:
427
diff
changeset
|
27 |
\item Do not use \textbf{\texttt{var}}! This declares a mutable variable. Only
|
| 166 | 28 |
use \texttt{val}!
|
29 |
||
30 |
\item Do not use any parallel collections! No \texttt{.par} therefore!
|
|
31 |
Our testing and marking infrastructure is not set up for it. |
|
32 |
\end{itemize}
|
|
33 |
} |
|
34 |
||
| 347 | 35 |
\newcommand{\IMPORTANTNONE}[1]{%
|
36 |
\subsubsection*{Important\alert}
|
|
37 |
||
38 |
\begin{itemize}
|
|
39 |
\item Make sure the files you submit can be processed by just calling\\ |
|
| 474 | 40 |
\mbox{\texttt{scala-cli compile <<filename.scala>>}} on the command line.\footnote{All
|
| 424 | 41 |
major OSes, including Windows, have a command line. So there is no |
| 471 | 42 |
good reason to not download scala-cli, install it and run it on your |
| 347 | 43 |
own computer. Just do it!} Use the |
44 |
template files provided and do not make any changes to arguments of |
|
45 |
functions or to any types. You are free to implement any auxiliary |
|
46 |
function you might need. |
|
47 |
||
48 |
\item \textbf{Do not leave any test cases running in your code because this might slow
|
|
49 |
down your program!} Comment out test cases before submission, otherwise you |
|
50 |
might hit a time-out. |
|
51 |
||
52 |
\item Do not use any mutable data structures in your |
|
53 |
submissions! They are not needed. This means you cannot create new |
|
54 |
\texttt{Array}s or \texttt{ListBuffer}s, for example.
|
|
55 |
||
56 |
\item Do not use \texttt{return} in your code! It has a different
|
|
57 |
meaning in Scala than in Java. It changes the meaning of your program, |
|
58 |
and you should never use it. |
|
59 |
||
60 |
\item Do not use \texttt{var}! This declares a mutable variable. Only
|
|
61 |
use \texttt{val}!
|
|
62 |
||
63 |
\item Do not use any parallel collections! No \texttt{.par} therefore!
|
|
64 |
Our testing and marking infrastructure is not set up for it. |
|
65 |
\end{itemize}
|
|
66 |
} |
|
67 |
||
| 174 | 68 |
\newcommand{\IMPORTANTEXAM}{%
|
69 |
\noindent |
|
70 |
\subsubsection*{Important}
|
|
71 |
||
72 |
\begin{itemize}
|
|
73 |
\item Make sure the files you submit can be processed by just calling\\ |
|
| 474 | 74 |
\mbox{\texttt{scala-cli compile <<filename.scala>>}} on the command line. Use the
|
| 174 | 75 |
template file provided and do not make any changes to arguments of |
76 |
functions or to any types. You are free to implement any auxiliary |
|
77 |
function you might need. |
|
78 |
||
79 |
\item Do not use any mutable data structures in your |
|
80 |
submission! They are not needed. This means you cannot create new |
|
81 |
\texttt{Array}s or \texttt{ListBuffer}s, for example.
|
|
82 |
||
83 |
\item Do not use \texttt{return} in your code! It has a different
|
|
84 |
meaning in Scala than in Java. |
|
85 |
||
86 |
\item Do not use \texttt{var}! This declares a mutable variable. Only
|
|
87 |
use \texttt{val}!
|
|
88 |
||
89 |
\item Do not use any parallel collections! No \texttt{.par} therefore!
|
|
90 |
\end{itemize}
|
|
91 |
} |
|
92 |
||
| 166 | 93 |
|
94 |
\newcommand{\DISCLAIMER}{%
|
|
| 335 | 95 |
\subsubsection*{Disclaimer\alert}
|
| 166 | 96 |
|
97 |
It should be understood that the work you submit represents |
|
| 426 | 98 |
your \textbf{own} effort! You have implemented the code entirely
|
|
428
cdfa6a293453
updated solutions and templates
Christian Urban <christian.urban@kcl.ac.uk>
parents:
427
diff
changeset
|
99 |
on your own. You have not copied from anyone else. |
| 470 | 100 |
Do not be tempted to ask Copilot for help or |
| 494 | 101 |
do any other AI-shenanigans like this! An exception is the Scala |
|
428
cdfa6a293453
updated solutions and templates
Christian Urban <christian.urban@kcl.ac.uk>
parents:
427
diff
changeset
|
102 |
code I showed during the lectures or uploaded to KEATS, |
|
cdfa6a293453
updated solutions and templates
Christian Urban <christian.urban@kcl.ac.uk>
parents:
427
diff
changeset
|
103 |
which you can freely use.\bigskip |
| 174 | 104 |
} |
105 |
||
106 |
\newcommand{\DISCLAIMEREXAM}{%
|
|
107 |
\subsubsection*{Disclaimer}
|
|
108 |
||
109 |
It should be understood that the work you submit represents |
|
| 426 | 110 |
your \textbf{own} effort! You have implemented the code entirely
|
111 |
on your own. You have not copied from anyone else or any other |
|
112 |
source. An |
|
| 174 | 113 |
exception is the Scala code I showed during the lectures or |
114 |
uploaded to KEATS, which you can freely use.\medskip |
|
115 |
||
116 |
\noindent |
|
117 |
During the exam you may \textbf{not} communicate with other people: no email,
|
|
118 |
instant messaging, discussion forums, use of mobile phones, etc. |
|
119 |
\bigskip |
|
| 166 | 120 |
} |