\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{cs4215final}
              [2001/07/28 v1.0; final for CS 3234]

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}

\ProcessOptions

\LoadClass{article}

\usepackage{fancybox}
\usepackage{alltt}
\usepackage{color}

\input slidepreamble

\newcommand{\ps@exam}{%
\renewcommand{\@oddhead}{CS 4215 \hfil \textrm{\thepage}}%
\renewcommand{\@evenhead}{\@oddhead}%
\renewcommand{\@evenfoot}{}%
\renewcommand{\@oddfoot}{\@evenfoot}}

\pagestyle{exam}

\newcounter{questioncounter}
\setcounter{questioncounter}{0}
\newcounter{altcounter}

\newenvironment{question}{%
\addtocounter{questioncounter}{1}
\vspace{10mm}
\textbf{Question \thequestioncounter}:}% 
{}

\newenvironment{answer}{%
\vspace{20mm}
\color{white}
\textbf{Answer}:
}% 
{
\color{black}
}


\newenvironment{alternatives}{%
\setcounter{altcounter}{1}
\begin{itemize}}%
{
\end{itemize}}

\newcommand{\Item}{\item[\thequestioncounter\ \Ovalbox{\Alph{altcounter}}]
\addtocounter{altcounter}{1}
}

\ProcessOptions

\parindent 0pt

%\setlength{\voffset}{-30mm}
\setlength{\textheight}{650pt}
%\setlength{\textwidth}{240mm}
\setlength{\textwidth}{145mm}
\setlength{\oddsidemargin}{10mm}

\AtBeginDocument{%

\thispagestyle{empty}

\begin{center}
\bf
{\large NATIONAL UNIVERSITY OF SINGAPORE}
\vspace{5mm}

{\large SCHOOL OF COMPUTING}

{\large EXAMINATION FOR}
\vspace{5mm}

{\large SEMESTER 2 2010/2011}
\vspace{5mm}

{\large CS 4215 - PROGRAMMING LANGUAGE IMPLEMENTATION}
\vspace{15mm}

{\large April 2011} \hspace{30mm} {\large Time Allowed: 2 Hours}

\end{center}

\vspace{3mm}

\hrule

\vspace{6mm}

{\large \textbf{INSTRUCTIONS TO CANDIDATES}}
\vspace{3mm}

\noindent
This question booklet has 18 pages, including this cover page, and
contains 9 questions. Answer all questions.
This is an open book examination. Any written and printed
material may be used during the examination, but no electronic 
devices are allowed to remain switched on.

\vspace{2cm}

Please enter your matriculation number here:

\vspace{1cm}

{\LARGE
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\ \ &\  \ &\  \ &\  \ &\  \ &\  \ &\  \ &\  \ &\  \ &\  \ &\  \ \\
\hline
\end{tabular}
}

\vspace{1cm}


\hrulefill\ {\bf Do not write below this line}\ \hrulefill

\vspace{4mm}

\begin{center}
{\normalsize
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c||c|}
\hline
Q\# & \ 1 \ &\  2 \ &\  3 \ &\  4 \ &\  5 \ &\  6 \ &\  7 \ &\  8 \ &\
9\ &  $\Sigma$ \\ \hline
Max & 8  & 4  & 12  & 12  & 7  & 12  & 6 & 8 & 6 &  75 \\ \hline
Sc  &   &   &   &   &   &   &   &   &  & \\
\hline
\end{tabular}
}
\end{center}

\newpage


}

