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

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

\ProcessOptions

\LoadClass{article}

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

\input slidepreamble

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

{\large CS 5216 - LOGIC AND CONSTRAINT PROGRAMMING}
\vspace{15mm}

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

\end{center}

\vspace{10mm}

\hrule

\vspace{10mm}

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

\begin{enumerate}
\item This is an open book examination. Any written and printed
material may be used during the examination. 
\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 16 pages, 
including this cover page, and contains 8 questions.
\item Answer all questions.
\item The maximal marks achievable is indicated for each question.
The maximal number of marks achievable for the exam is 60. 
The first question has
an extra credit component worth 5 additional marks.
\end{enumerate}

\vspace{10mm}
\begin{center}

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

\vspace{15mm}

{\large
\begin{tabular}{|c||c|c|c|c|c|c|c|c||c|}
\hline
Question   &  1   & 2 & 3 & 4 &  5 & 6 &  7 & 8 &  Total\\ \hline
Max. Score & 6+5  & 4 & 8 & 8 & 10 & 8 & 12 & 4 &  60+5 \\ \hline
St. Score  &      &   &   &   &    &   &    &   &       \\
\hline
\end{tabular}
}
\end{center}

\newpage

}


