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

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

\ProcessOptions

\LoadClass{article}

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

\input slidepreamble

\newcommand{\ps@exam}{%
\renewcommand{\@oddhead}{CS 3212 \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 1 2006/2007}
\vspace{5mm}

{\large CS 3212 - PROGRAMMING LANGUAGES}
\vspace{15mm}

{\large December 2006} 

\vspace{15mm} 

{\large Time Allowed: 2 Hours}

\end{center}

\vspace{10mm}

\hrule

\newpage

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

\noindent

{\large This is an open book examination. Any written and printed
material may be used during the examination. 

\vspace{4mm}
Please observe the following items:

\begin{enumerate}
\item Enter your matriculation number here:\\
{\LARGE
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\ \ &\  \ &\  \ &\  \ &\  \ &\  \ &\  \ &\  \ &\  \ &\  \ &\  \ \\
\hline
\end{tabular}
}

\item Enter the answers to the questions in this
answer book in the provided spaces.
\item This examination booklet has 33 pages, 
including the previous and this page, and contains 10 questions.
\item Answer all questions.
\item The maximal marks achievable is indicated for each question.
Overall, the maximal number of marks is 80.
\end{enumerate}

\begin{center}
{\bf{\large Good Luck !}}
\vspace{15mm}

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

\vspace{15mm}

\hspace{15mm}
{
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c||c|}
\hline
Q \# & \ 1 \ &\  2 \ &\  3 \ &\  4 \ &\  5 \ &\  6 \ &\  7 \ &\  8 \ &\  9 \ & 10  &  Total\\ \hline
Max & 8  & 6  & 4  & 12  & 18 & 8  & 7  & 2  & 10  & 5  & 80 \\ \hline
Std &   &   &   &   &   &   &   &   &   &   & \\
\hline
\end{tabular}
}
\end{center}

\newpage

}
}

