Skip to content
Snippets Groups Projects
Commit 6d256c75 authored by W. Spencer Smith's avatar W. Spencer Smith
Browse files

Edits to Parnas Tables lecture

parent 6718cd68
No related branches found
No related tags found
No related merge requests found
Lectures/Figures/Adapter.png

23.2 KiB

......@@ -486,7 +486,8 @@ so on. The actual execution of the command is delegated to a supplier component
\includegraphics[scale=0.8]{../Figures/command.png}
~\\
\href{http://www.dofactory.com/net/command-design-pattern}{http://www.dofactory.com/net/command-design-pattern}
\href{http://www.dofactory.com/net/command-design-pattern}
{http://www.dofactory.com/net/command-design-pattern}
\end{frame}
......
No preview for this file type
%\documentclass[t,12pt,numbers,fleqn,handout]{beamer}
\documentclass[t,12pt,numbers,fleqn]{beamer}
\documentclass[t,12pt,numbers,fleqn,handout]{beamer}
%\documentclass[t,12pt,numbers,fleqn]{beamer}
\usepackage{pgfpages}
\usepackage{hyperref}
......@@ -83,14 +83,11 @@ TBD
\item A3
\begin{itemize}
\item Part 1 - Solution: Mar 18
\item Part 2 - Code: due 11:59 pm Mar 26
\end{itemize}
\item A4
\bi
\item Your own design and specification
\item Model module for game of Freecell
\item Due April 9 at 11:59 pm
\ei
......@@ -135,11 +132,30 @@ so on. The actual execution of the command is delegated to a supplier component
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Command in UML}
\includegraphics[scale=0.8]{../Figures/command.png}
~\\
\href{http://www.dofactory.com/net/command-design-pattern}
{http://www.dofactory.com/net/command-design-pattern}
%invoker can track list of previous commands
%command can include undo execute
%receiver actually knows how to do the calculation
%client associates receiver and concrete command
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Adapter Design Pattern}
\structure{When have we used the adapter (or wrapper) design pattern?}
% wrapper for sequence for A1
% npolyVal(n, x) implemented by numpy polyfit
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -153,6 +169,18 @@ so on. The actual execution of the command is delegated to a supplier component
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Adapter UML Diagram}
\includegraphics[scale=0.42]{../Figures/Adapter.png}
\href{https://commons.wikimedia.org/wiki/File:Adapter_using_delegation_UML_class_diagram.png}
{Link}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Factory Pattern}
......@@ -160,6 +188,9 @@ so on. The actual execution of the command is delegated to a supplier component
\href{https://www.tutorialspoint.com/design_pattern/factory_pattern.htm}{Code}
% create object without exposing the creation logic, refer to newly created
% object using a common interface.
% Client is decoupled from the implementation details of derived classes
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -260,6 +291,10 @@ designs
%sp is set point
%e mean enumerated type
%subscript -1 means previous value
~\\
~\\
\structure{What is this table specifying?}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -367,12 +402,15 @@ If Condition 1 then f\_name = Result 1\\
Elseif Condition 2 then f\_name = Result 2\\
Elseif ...\\
Elseif Condition n then f\_name = Result n\\
or f\_name = (Condition 1 $\Rightarrow$ Result 1 $|$ ...)
~\newline
\uncover<2->{\structure<2>{Disjointedness $\equiv$
$\forall (i, j: \mathbb{N} | 1 \leq i \leq n \wedge 1 \leq j \leq n \wedge i \neq j : \mbox{Condition } i \wedge
\mbox{Condition } j \Leftrightarrow \mbox{false})$\\
~\\
Completeness $\equiv \vee (i: \mathbb{N} | 1 \leq i \leq n : \mbox{Condition } i )$}}
Completeness $\equiv \vee (i: \mathbb{N} | 1 \leq i \leq n : \mbox{Condition } i
)$}}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -430,8 +468,8 @@ Horizontal condition tables \\
\frametitle{World View of Tables}
\bi
\item \structure{Do tables take a dynamic or a static world view?}
\item \structure{Can you write an algorithm with a table?}
\item \structure{Do tables take a dynamic or a static world view?} %static
\item \structure{Can you directly write an algorithm from a table?} %maybe
\ei
\end{frame}
......@@ -484,7 +522,7 @@ sequences of operations
\begin{itemize}
\item Consider all of the cases
\item Consider all of the cases for a rectangle
\item Draw a picture
\item Short form notation
\begin{itemize}
......@@ -495,6 +533,7 @@ sequences of operations
\item $llxw = \mathit{lower\_left}.\mbox{xcoord()} + \mathit{width}$
\item $llyh = \mathit{lower\_left}.\mbox{ycoord()} + \mathit{height}$
\item T = Constants.TOLERANCE
\item $p1$.dist$(p2$) is the distance between p1 and p2
\end{itemize}
\end{itemize}
......@@ -623,4 +662,16 @@ $p.\mbox{dist}(\mbox{PointT}(llxw, llyh)) ] \leq \mbox{T}$}\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Nine Cases, but 2D}
\bi
\item \structure{How would you write all 9 cases, but with a tabular form that
closely matches the original 2D problem description?}
\ei
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment