Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
se2aa4_cs2me3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
W. Spencer Smith
se2aa4_cs2me3
Commits
6b35fe8a
Commit
6b35fe8a
authored
8 years ago
by
Steven Palmer
Browse files
Options
Downloads
Patches
Plain Diff
first version of T6
parent
73f47d39
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Tutorials/T6/T6.pdf
+0
-0
0 additions, 0 deletions
Tutorials/T6/T6.pdf
Tutorials/T6/T6.tex
+364
-0
364 additions, 0 deletions
Tutorials/T6/T6.tex
with
364 additions
and
0 deletions
Tutorials/T6/T6.pdf
0 → 100644
+
0
−
0
View file @
6b35fe8a
File added
This diff is collapsed.
Click to expand it.
Tutorials/T6/T6.tex
0 → 100644
+
364
−
0
View file @
6b35fe8a
% Define Document Class
% Class Options Include:
% notes, notesonly, handout, trans,
% hidesubsections, shadesubsections,
% inrow, blue, red, grey, brown
%--------------------------------------------------------------------------
\documentclass
[xcolor=dvipsnames, shownotes, colorlinks]
{
beamer
}
%--------------------------------------------------------------------------
% -------------------------------------------------------------------------
% Define Package Theme
%--------------------------------------------------------------------------
\usepackage
{
color
}
\usepackage
[T1]
{
fontenc
}
%% \usepackage{fix-cm}
\usepackage
{
hyperref
}
\hypersetup
{
urlcolor=cyan,
linkcolor=white
}
\usepackage
{
subfigure
}
%% \usepackage{xspace}
\usepackage
{}
\usepackage
{
enumerate
}
\usetheme
{
Antibes
}
\setbeamertemplate
{
sidebar
}
[right]
\usepackage
{
listings
}
% Code formatting
\usepackage
{
lstautogobble
}
%% \usepackage{framed}
\usepackage
{
booktabs
}
\usepackage
{
tabularx
}
\usepackage
{
marvosym
}
\usepackage
{
tikz
}
\usetikzlibrary
{
shapes
}
\usetikzlibrary
{
arrows
}
\usetikzlibrary
{
calc,positioning
}
\setbeamertemplate
{
caption
}
[numbered]
\lstset
{
language=python,
basicstyle=
\ttfamily\scriptsize
,
tabsize=2,
breaklines=true,
prebreak=
\raisebox
{
0ex
}
[0ex][0ex]
{
\ensuremath
{
\hookleftarrow
}}
,
frame=single,
showstringspaces=true,
showspaces=false,
keywordstyle=
\color
{
blue
}
,
stringstyle=
\color
{
magenta
}
,
commentstyle=
\color
{
ForestGreen
}
,
morekeywords=
{}
,
autogobble=true
}
%------------------------------------------------------------------------------
% Commands
%------------------------------------------------------------------------------
\newcommand*\oldmacro
{}
%
\let\oldmacro\insertshorttitle
%
\renewcommand*\insertshorttitle
{
%
\oldmacro\hfill
%
\insertframenumber\,
/
\,\inserttotalframenumber
}
% Figure Source
\usepackage
[absolute,overlay]
{
textpos
}
\setbeamercolor
{
framesource
}{
fg=gray
}
\setbeamerfont
{
framesource
}{
size=
\tiny
}
\newcommand
{
\source
}
[1]
{
\begin{textblock*}
{
\paperwidth
}
(-5pt,
\textheight
)
\begin{beamercolorbox}
[ht=0.5cm,right]
{
framesource
}
\usebeamerfont
{
framesource
}
\usebeamercolor
[fg]
{
framesource
}
Source:
{
#1
}
\end{beamercolorbox}
\end{textblock*}
}
%--------------------------------------------------------------------------
% Presentation Title Slide
%--------------------------------------------------------------------------
\title
{
Midterm Preparation
}
\subtitle
{
CS 2ME3/SE 2AA4
}
\author
{
Steven Palmer
}
\institute
{
Department of Computing and Software
\\
McMaster University
\\
}
\date
{
February 13 - 17
}
%--------------------------------------------------------------------------
% Document
% To add notes to the slides use: \note{}
% Add \section{} or \subsection{} for use in table of contents
%--------------------------------------------------------------------------
\begin{document}
% Create Title Slide
\begin{frame}
\maketitle
\end{frame}
\section
[Outline]
{}
% Create Table of Contents Slide - Outline
\begin{frame}
\frametitle
{
Outline
}
{
\hypersetup
{
linkcolor=black
}
\tableofcontents
}
\end{frame}
% -----------------------------------------------------
\section
{
About the Midterm
}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Midterm Format
}
\begin{itemize}
\item
90 minutes
\item
Multiple choice questions
\item
Written notes, printed notes and textbook are permitted.
\item
All electronic devices are
{
\bf
not
}
permitted.
\end{itemize}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
What Material Should I Review?
}
Everything covered during class and tutorials is fair game. You should review:
\begin{itemize}
\item
All lecture slides
\item
Ghezzi: Ch. 1 to 4
\item
Hoffman
\&
Strooper: Ch. 1 to 7
\item
Parnas papers in repository
\item
Tutorial slides
\item
Assignments and solutions
\end{itemize}
\end{frame}
% -----------------------------------------------------
\section
{
Example Questions
}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q1
}
External software qualities are the qualities that result from the use of external libraries in software code.
\\
[10pt]
\begin{enumerate}
\item
True
\item
False
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q1 Answer
}
External software qualities are qualities that result from the use of external libraries in software code.
\\
[10pt]
\begin{enumerate}
\item
True
\item
{
\bf
\underline
{
False
}}
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q2
}
A
$
\rule
{
2
cm
}{
0
.
15
mm
}$
is a general concept that is widely applicable in software engineering.
\\
[10pt]
\begin{enumerate}
\item
tool
\item
technique
\item
principle
\item
method
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q2 Answer
}
A
$
\rule
{
2
cm
}{
0
.
15
mm
}$
is a general concept that is widely applicable in software engineering.
\\
[10pt]
\begin{enumerate}
\item
tool
\item
technique
\item
{
\bf
\underline
{
principle
}}
\item
method
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q3
}
A
$
\rule
{
2
cm
}{
0
.
15
mm
}$
system enables reasoning to be mechanized.
\\
[10pt]
\begin{enumerate}
\item
rigourous
\item
modular
\item
functional
\item
formal
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q3 Answer
}
A
$
\rule
{
2
cm
}{
0
.
15
mm
}$
system enables reasoning to be mechanized.
\\
[10pt]
\begin{enumerate}
\item
rigourous
\item
modular
\item
functional
\item
{
\bf
\underline
{
formal
}}
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q4
}
In the Module Guide (MG), which of the following does not fit the criteria for a good module secret?
\\
[10pt]
\begin{enumerate}
\item
one module should have one or more secrets
\item
secrets should often be nouns
\item
secrets are often phrased as "How to..."
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q4 Answer
}
In the Module Guide (MG), which of the following does not fit the criteria for a good module secret?
\\
[10pt]
\begin{enumerate}
\item
{
\bf
\underline
{
one module should have one or more secrets
}}
\item
secrets should often be nouns
\item
secrets are often phrased as "How to..."
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
Given the following MIS access routine semantics specification for a function f,
\\
[10pt]
\frametitle
{
Example Q5
}
\noindent
f(
$
x, y
$
):
\begin{itemize}
\item
output:
$
out :
=
\sqrt
{
x
^
2
+
y
^
2
}$
\item
exception: none
\\
[10pt]
\end{itemize}
What do we know about how f(x,y) is implemented?
\\
[10pt]
\begin{enumerate}
\item
a math library is required to perform the square root operation
\item
the function consists of a single line that calculates and returns the output
\item
both 1 and 2
\item
nothing
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
Given the following MIS access routine semantics specification for a function f,
\\
[10pt]
\frametitle
{
Example Q5 Answer
}
\noindent
f(
$
x, y
$
):
\begin{itemize}
\item
output:
$
out :
=
\sqrt
{
x
^
2
+
y
^
2
}$
\item
exception: none
\\
[10pt]
\end{itemize}
What do we know about how f(x,y) is implemented?
\\
[10pt]
\begin{enumerate}
\item
a math library is required to perform the square root operation
\item
the function consists of a single line that calculates and returns the output
\item
both 1 and 2
\item
{
\bf
\underline
{
nothing
}}
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q6
}
Which of the following is not true of pure functional programming languages?
\\
[10pt]
\begin{enumerate}
\item
computation is treated as the evaluation of mathematical functions
\item
functions have side effects
\item
functions are a first order data type
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q6 Answer
}
Which of the following is not true of pure functional programming languages?
\\
[10pt]
\begin{enumerate}
\item
computation is treated as the evaluation of mathematical functions
\item
{
\bf
\underline
{
functions have side effects
}}
\item
functions are a first order data type
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
[fragile]
\frametitle
{
Example Q7
}
\begin{lstlisting}
def f(x,y):
return x * y
numList = [2,4,6,8,10]
#BEGIN
product = 1
for e in numList:
product = f(product, e)
#END
\end{lstlisting}
The code segment between the BEGIN and END comments is equivalent to which of the following?
\\
[10pt]
\begin{enumerate}
\item
product = map(f, numList)
\item
product = filter(f, numList)
\item
product = reduce(f, numList)
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
[fragile]
\frametitle
{
Example Q7 Answer
}
\begin{lstlisting}
def f(x,y):
return x * y
numList = [2,4,6,8,10]
#BEGIN
product = 1
for e in numList:
product = f(product, e)
#END
\end{lstlisting}
The code segment between the BEGIN and END comments is equivalent to which of the following?
\\
[10pt]
\begin{enumerate}
\item
product = map(f, numList)
\item
product = filter(f, numList)
\item
{
\bf
\underline
{
product = reduce(f, numList)
}}
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q8
}
Git is an example of a
$
\rule
{
2
cm
}{
0
.
15
mm
}$
version control system.
\\
[10pt]
\begin{enumerate}
\item
distributed
\item
centralized
\item
local-only
\end{enumerate}
\end{frame}
% -----------------------------------------------------
\begin{frame}
\frametitle
{
Example Q8 Answer
}
Git is an example of a
$
\rule
{
2
cm
}{
0
.
15
mm
}$
version control system.
\\
[10pt]
\begin{enumerate}
\item
{
\bf
\underline
{
distributed
}}
\item
centralized
\item
local-only
\end{enumerate}
\end{frame}
\end{document}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment