cws/cw05.tex
changeset 307 3c7ac7836e4f
parent 306 1877cc717291
child 325 ca9c1cf929fa
equal deleted inserted replaced
306:1877cc717291 307:3c7ac7836e4f
    11 \newcommand\barbelow[1]{\stackunder[1.2pt]{#1}{\raisebox{-4mm}{\boldmath$\uparrow$}}}
    11 \newcommand\barbelow[1]{\stackunder[1.2pt]{#1}{\raisebox{-4mm}{\boldmath$\uparrow$}}}
    12 
    12 
    13 
    13 
    14 \begin{document}
    14 \begin{document}
    15 
    15 
    16 \section*{Coursework 10 (Scala)}
    16 \section*{Part 10 (Scala)}
    17 
    17 
    18 \mbox{}\hfill\textit{``If there's one feature that makes Scala,}\\
    18 \mbox{}\hfill\textit{``If there's one feature that makes Scala,}\\
    19 \mbox{}\hfill\textit{`Scala', I would pick implicits.''}\smallskip\\
    19 \mbox{}\hfill\textit{`Scala', I would pick implicits.''}\smallskip\\
    20 \mbox{}\hfill\textit{ --- Martin Odersky (creator of the Scala language)}\bigskip\medskip
    20 \mbox{}\hfill\textit{ --- Martin Odersky (creator of the Scala language)}\bigskip\medskip
    21 
    21 
    22 
    22 
    23 \noindent
    23 \noindent
    24 This coursework is about a small programming
    24 This part is about a small programming
    25 language called brainf***. The coursework is worth 10\% and you need to 
    25 language called brainf***. The part is worth 10\% and you need to 
    26 submit on \cwTEN{} at 4pm.\bigskip
    26 submit on \cwTEN{} at 4pm.\bigskip
    27 
    27 
    28 \IMPORTANT{}
    28 \IMPORTANT{}
    29 
    29 
    30 \noindent
    30 \noindent
    83 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    83 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    84 \end{lstlisting}%$
    84 \end{lstlisting}%$
    85 
    85 
    86 \newpage
    86 \newpage
    87 
    87 
    88 \subsection*{Part 1 (6 Marks)}
    88 \subsection*{Part A (6 Marks)}
    89 
    89 
    90 Coming from Java or C++, you might think Scala is a rather esoteric
    90 Coming from Java or C++, you might think Scala is a rather esoteric
    91 programming language.  But remember, some serious companies have built
    91 programming language.  But remember, some serious companies have built
    92 their business on
    92 their business on
    93 Scala.\footnote{\url{https://en.wikipedia.org/wiki/Scala_(programming_language)\#Companies}}
    93 Scala.\footnote{\url{https://en.wikipedia.org/wiki/Scala_(programming_language)\#Companies}}
   332   \end{figure}
   332   \end{figure}
   333 \end{itemize}\bigskip  
   333 \end{itemize}\bigskip  
   334 
   334 
   335 %%\newpage
   335 %%\newpage
   336 
   336 
   337 \subsection*{Part 2 (4 Marks)}
   337 \subsection*{Part B (4 Marks)}
   338 
   338 
   339 I am sure you agree while it is fun to look at bf-programs, like the
   339 I am sure you agree while it is fun to look at bf-programs, like the
   340 Sierpinski triangle or the Mandelbrot program, being interpreted, it
   340 Sierpinski triangle or the Mandelbrot program, being interpreted, it
   341 is much more fun to write a compiler for the bf-language.
   341 is much more fun to write a compiler for the bf-language.
   342 
   342