Latex UMT Exam Template

UMT Exam
Following is an exam template that was created for University of Management and Technology Lahore, typeset using pdflatex and Philip Hirschhorn's exam.cls:
% Exam Template for University of Management and Technology Lahore
% Author: Abu Bakar Siddique
% The folder of this tex should also contains UMTLogo.jpg and exam.cls
% Adapted From:
% Exam Template for UMTYMP and Math Department courses
% Using Philip Hirschhorn's exam.cls:
% run pdflatex on a finished exam at least three times to do the grading table on front page.

\RequirePackage{amssymb, amsfonts, amsmath, latexsym, verbatim, xspace, setspace}
\RequirePackage{tikz, pgflibraryplotmarks}
    treenode/.style = {circle, draw=black, align=center,
                          minimum size=1cm, anchor=center},

%            E X A M   I N F O R M A T I O N

\newcommand{\courseTitle}{Data Structures And Algorithms}
\newcommand{\examDate}{April 09, 2013}
\newcommand{\examType}{Mid Term}
\newcommand{\RP}{Mr. Saleem Ata (Sec A \& E), Abu Bakar Siddique (Sec  B, C \& D)}
\newcommand{\semester}{Spring 2013}
\newcommand{\timeAllowed}{30 Minutes}


% \onehalfspacing
% \doublespacing
% For an exam, single spacing is most appropriate

% For an exam, we generally want to turn off paragraph indentation
%\parindent 3ex

\title{\vspace{-7ex} University of Management \& Technology\vspace{-1ex}}
\author{Department of Electrical Engineering


\begin{tabular}{l c}
\multirow{4}{*}{ \includegraphics[width=.75in]{UMTLogo.jpg} }& \\
& {\Large  \textbf{University of Management \& Technology}}\\
&\large \textbf{School of Engineering}\\
& \textbf{Department of Electrical Engineering}\\ %[\rowSpace]

%        Header
\runningheader{ \textbf{Student ID:}}{\includegraphics[scale=.1]{UMTLogo.jpg}}{\textbf{Section:}\quad}
\runningfooter{}{Page \thepage\ of \numpages}{}

\begin{tabular}{p{1.5in} p{2in} p{.05in} p{1.2in} p{1in}}

\textbf{Student ID}&\hrule && \textbf{Section} & \hrule \\ [\rowSpace]
\textbf{Student Name}&\hrule && \textbf{Semester}& \semester\\ [\rowSpace]
\textbf{Student Signature}&\hrule&&&\\ [\rowSpace]
\textbf{Course Code}&\courseCode && \textbf{Academic Year} & \academicYear\\
\textbf{Course Title}& \courseTitle && \textbf{Time Allowed} & \timeAllowed\\
\textbf{Exam Date}& \examDate && \textbf{Total Marks}& \totalMarks\\
\textbf{Exam}& \examType && & \\
\textbf{Resource Person(s)} & \multicolumn{4}{p{4.5in}}{\RP}\\
\emph{The instructions below must be followed strictly. Failure to do so can result in serious grade loss.}\\
 \textbf{You must}
  \item Keep your eyes on your own paper.
  \item Switch off your mobile phones completely.

\textbf{Specific instructions}
\item \textbf{Calculator Allowed, Closed Book, Closed Notes.}
\item \textbf{No extra sheet} will be given. Use the available space wisely.
\item \textbf{Use a blue or black} ball point or pen. Please do not use lead pencils.
\item \textbf{Provide final answers} in the space provided.You may use back blank sheets for rough work.

\textbf{Certificate to be filled at the time of exam}

I have counted all \numpages\ pages in this exam and no page is missing. \hfill \textbf{Student Signature}

\addpoints % required here by exam.cls, even though questions haven't started yet.
\gradetable[h][questions]%[pages]  % Use [pages] to have grading table by page instead of question


\textbf{Certificate to be filled during paper viewing}

I have reviewed my paper and all \numquestions\ questions have been marked with\\ no
 part left unmarked. Counting is also correct. \hfill \textbf{Student Signature}

\newpage % End of cover page

%            Q U E S T I O N S
% See for full documentation, but the questions
% below give an idea of how to write questions [with parts] and have the points
% tracked automatically on the cover page.


% Basic question
%\question[10] Differentiate $f(x)=x^2$ with respect to $x$.

\question[3] Write Pre-Order, In-Order and Post-Order traversals of following tree:

    \begin{tikzpicture}[->,>=stealth',level/.style={sibling distance = 5cm/#1,
    level distance = 1.5cm},scale=0.6, transform shape]

    \node [treenode] {7}
        node [treenode] {5}
            node [treenode] {3}
            child{ node [treenode] {1} }
            child{ node [treenode] {4} }
        child{ node [treenode] {6} }
        node [treenode] {8}
        	node [treenode] {1}
            node [treenode] {2}
            child{ node [treenode] {7} }
            child{ node [treenode] {9} }

\question[2] A Binary Tree has 37 nodes. What is the minimum height of the tree that can take all of these nodes? Take height of a single node tree as 1.

\question[3] Make structure of a binary tree that has following Pre-Order and In-Order traversals:
\item[Pre-Order:] A, B, D, E, F, G, C
\item[In-Order:] D, B, F, E, G, A, C

\question[1] How many comparisons would take place when finding a value in a sorted list of 1024 entries using binary search algorithm? (2 Marks)

\question[4] Construct binary search tree when values are inserted in following order:\\
 $\longrightarrow$ 9, 13, 12, 1, 7, 25, 4, 19, 3, 23, 11, 4, 27,6

\question[2] Starting with empty stack, what would be the contents of the stack after following operations are performed.Draw the stack after the following operations
\item Push(56)
\item Push(92)
\item Push(7)
\item Pop()
\item Push(5)
\item Pop()


% Question with parts
%\question Consider the function $f(x)=x^2$.
%\part[5] Find $f'(x)$ using the limit definition of derivative.
%\part[5] Find the line tangent to the graph of $y=f(x)$ at the point where $x=2$.

% If you want the total number of points for a question displayed at the top,
% as well as the number of points for each part, then you must turn off the point-counter
% or they will be double counted.
%\question[10] Consider the function $f(x)=x^3$.
%\noaddpoints % If you remove this line, the grading table will show 20 points for this problem.
%\part[5] Find $f'(x)$ using the limit definition of derivative.
%\part[5] Find the line tangent to the graph of $y=f(x)$ at the point where $x=2$.



Comments Invited

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s