Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • liangb30/cas-741-boliang
  • pignierb/cas741
  • jimoha1/cas741
  • huoy8/cas741
  • grandhia/cas741
  • chenq84/cas741
  • yex33/cas741
  • xuey45/cas741
  • garcilau/cas-741-uriel-garcilazo-msa
  • schankuc2/cas741
  • ahmady3/cas741
  • saadh/cas741
  • singhk56/cas741
  • lin523/cas741
  • fangz58/cas741
  • tranp30/cas741
  • ceranich/cas741
  • norouf1/cas741
  • mirzam48/cas741
  • djavahet/cas741
  • hossaa27/cas741
  • yiding_el/cas-741-upate-name
  • sayadia/cas741
  • elmasn2/cas741
  • cheemf8/cas741
  • cheny997/cas741
  • ma209/cas741
  • mousas26/cas741
  • liuy363/cas741
  • wongk124/cas741
  • dua11/cas741
  • zhoug28/cas741
  • courses/cas-741-tst
  • liy443/cas-741-fork-csv
  • sochania/cas741
  • liy443/cas-741-update-csv-old
  • mahdipoa/cas741
  • wangz892/cas741
  • wangn14/cas741
  • defourej/cas741
  • zhaox183/cas741
  • smiths/cas741
42 results
Show changes
Commits on Source (60)
Showing
with 499 additions and 122 deletions
File deleted
......@@ -4,11 +4,11 @@
\frametitle{Administrative Details: Report Deadlines}
~\newline
\begin{tabular}{l l l}
\textbf{Problem Statement} & Week 02 & Jan 17\\
{System Req.\ Spec.\ (SRS)} & Week 04 & Jan 31\\
{System VnV Plan} & Week 06 & Feb 14\\
{MG + MIS} & Week 09 & Mar 14\\
{Drasil Code} & Week 09 & Mar 14\\
%{Problem Statement} & Week 02 & Jan 17\\
%{System Req.\ Spec.\ (SRS)} & Week 04 & Feb 05\\
%\textbf{System VnV Plan} & Week 06 & Feb 26\\
%{MG + MIS} & Week 10 & Mar 19\\
%{Drasil Code} & Week 09 & Mar 14\\
{Final Documentation} & Week 13 & Apr 11\\
\end {tabular}
......@@ -32,11 +32,11 @@ traditional SRS
~\newline
\begin{tabular}{l l}
\textbf{SRS} & Week 03/04\\
{Syst.\ VnV} & Week 06\\
{POC Demo} & Week 07\\
{MG + MIS} & Week 09\\
Drasil & Week 11 \\
%{SRS} & Week 03/04\\
%\textbf{Syst.\ VnV} & Week 06\\
%{POC Demo} & Week 08\\
%{MG + MIS} & Week 10\\
%Drasil & Week 11 \\
Unit VnV/Implement & Week 12 \\
\end {tabular}
......@@ -59,31 +59,32 @@ take it personally
\begin{frame}
\frametitle{Presentation Schedule}
\bi
\item SRS Present (15 min)
\bi
\item {Jan 24: , , , , , }
\item {Jan 28: , , , , , }
\item {Jan 31: , , , , , }
\item {Feb 4: , }
\ei
%\bi
% \item SRS Present (15 min)
% \bi
% \item {Jan 24: Uriel, Yasmin, Christopher, Baptiste, Kiran}
% \item {Jan 28: Bo, Joe, Junwei, Aliyah, Ziyang}
% \item {Jan 31: Yuanqi, Qianlin, Phillip, Hussein}
% \item {Feb 4: Alaap, Yinying}
% \ei
%\item Syst V\&V Plan Present (L11, L12) (20 min)
%\bi
%\item {Feb 13: Fasil, Hunter, Phil, Adrian}
%\item {Feb 16: Gaofeng, Al, Seyed Ali, Xinyu}
%\ei
% \item Proof of Concept Demonstrations (L14) (20 min)
% \bi
% \item {Mar 1: Cynthia, Valerie, Waqar, Yi-Leng}
% \item {Feb 14: Qianlin, Junwei, Joe, Volunteer?}
% \item {Feb 25: Yinying, Bo, Hussein, Volunteer?}
% \ei
%\item Proof of Concept Demonstrations (L14) (20 min)
%\bi
%\item {Mar 4: Christopher, Uriel, Volunteer?, Volunteer?}
%\ei
% \item MG+MIS Present (L17, L18) (20 minutes) %(Drasil SRS Code)
% \bi
% \item {Mar 12: Nada, Morteza, Kim Ying, Atiyeh}
% \item {Mar 15: Fatemeh, Yiding, Tanya, Volunteer?}
% \item {Mar 14: Ziyang, Aliyah, Yuanqi, Alaap}
% \item {Mar 18: Phillip, Baptiste, Kiran, Volunteer?}
% \ei
\ei
%\ei
\end{frame}
......@@ -92,16 +93,15 @@ take it personally
\begin{frame}
\frametitle{Presentation Sched Cont'd}
%TBD
% \bi
% \item Implementation Present (15 min each)
% \bi
% \item
% % \item \textbf{Apr 2: Phil, Xinyu, Fasil, Yi-Leng}
% % \item \textbf{Apr 5: Gaofeng, Morteza, Valerie, Hunter, Ali}
% % \item \textbf{Apr 9: Cynthia, Adrian, Yiding, Kim Ying, Nada}
% \ei
% \ei
\bi
\item Implementation Present (L22 -- L25) (20 min each)
\bi
\item \textbf{Mar 28: Aliyah, Uriel, Ziyang, Yuanqi}
\item \textbf{Apr 1: Christopher, Bo, Joe, Junwei}
\item \textbf{Apr 4: Hussein, Kiran, Alaap, Qianlin}
\item \textbf{Apr 8: Yinying, Baptiste, Phillip}
\ei
\ei
\end{frame}
......@@ -111,17 +111,12 @@ take it personally
\frametitle{Presentation Schedule}
\bi
% \item Test or Impl.\ Present (25 min each)
% \bi
% \item Apr 5: Lesley, Deesha, Volunteer?
% \item Apr 6: Mina, Joachim, Maryam
% \ei
\item 3 or 4 presentations each %(please check)
\item 3 presentations each %(please check)
\begin{itemize}
\item SRS everyone
\item VnV and POC subset of class
\item Design subset of class
\item Implementation everyone
\item Implementation or testing results everyone
\end{itemize}
\item If you will miss a presentation, please trade with someone
......
......@@ -6,7 +6,7 @@
\bi
\item Project owners
\bi
\item ``Domain Expert'' and ``Secondary Reviewer''
\item ``Domain Expert''
\item Find your reviewers in \href{https://gitlab.cas.mcmaster.ca/smiths/cas741/-/blob/master/Repos.csv}
{Repos.csv}
\item Add your reviewers as collaborators
......@@ -15,6 +15,7 @@
\ei
\item Reviewers
\bi
\item Use the Peer Review issue template
\item Provide at least 5 issues on the document
\item Grading
\bi
......
No preview for this file type
......@@ -1150,6 +1150,38 @@ to improve reliability
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Feedback From Previous Years}
\begin{itemize}
\item Remember that you are writing the document for someone other than yourself
\item Introduction section gives the name for the software/library
\item Use \texttt{citep} and \texttt{citet} for \texttt{natbib}
\item When the assumptions are listed, traceability is given to where they are
used
\item If assumptions are not used, then they may not be necessary, or they might
be scope decisions
\item For NFRs, specify what you want, not how to achieve it
\item NFRs can point to the VnV plan for details (to make them unambiguous)
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Feedback From Previous Years}
\begin{itemize}
\item For reader/user characteristics, give the target course and what level it is taught. (Use a generic name, not a specific course name.)
\item Rationale provided for assumptions, scope decisions and constraints
\item Include a reference to the source of the template you are using
\item Requirements should trace to IMs
\item Define all symbols in table of contents and in Description field
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[allowframebreaks]
\frametitle{References}
......
No preview for this file type
......@@ -66,7 +66,7 @@
\bi
\item Administrative details
\item Motivating a document driven design process %including documentation
\item Finish up SRS
\item Finish up SRS Example
\item Requirements specification qualities
\item Motivation for families
\item Proposed family methods
......@@ -88,7 +88,7 @@
\item Not all projects approved
(\href{https://gitlab.cas.mcmaster.ca/smiths/cas741/-/blob/master/Repos.csv?ref_type=heads}
{Repos.csv})
\item All rubrics available on Avenue (please verify you can see them)
%\item 80 columns in tex files
%\item Spell check
%\item Replace ``in order to'' by ``to''
......@@ -215,6 +215,32 @@ Water Heating System}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Examples, Checklist and Template}
\begin{itemize}
\item
\href{https://jacquescarette.github.io/Drasil/examples/projectile/SRS/srs/Projectile_SRS.html}
{Projectile Example}
\item
\href{https://jacquescarette.github.io/Drasil/examples/glassbr/SRS/srs/GlassBR_SRS.html}
{GlassBR Example}
\item
\href{https://jacquescarette.github.io/Drasil/examples/swhsnopcm/SRS/HTML/SWHSNoPCM_SRS.html}
{SWHS Example} (Let's go through this one)
\item
\href{https://github.com/smiths/capTemplate/blob/main/docs/SRS/SRS.pdf}
{Blank SRS from Template} (Let's look at the advice/hints)
\item
\href{https://github.com/smiths/capTemplate/blob/main/docs/Checklists/SRS-Checklist.pdf} {Checklist}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \begin{frame}
% \frametitle{More Example Projects}
% \bi
......@@ -256,6 +282,24 @@ Water Heating System}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Software Requirements Activities}
\begin{itemize}
\item A software requirement is a description of how the system should behave,
or of a system property or attribute
\item Requirements should be \textbf{abstract}, \textbf{unambiguous},
\textbf{complete}, \textbf{consistent}, \textbf{modifiable}, \textbf{verifiable}
and \textbf{traceable}
\item Requirements should express ``What'' not ``How''
\item Formal versus informal specification
\item Functional versus nonfunctional requirements
\item Software requirements specification (SRS)
\item Requirements template
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \begin{frame}
% \frametitle{Kreyman and Parnas Five Variable Model}
% \begin{itemize}
......@@ -607,7 +651,8 @@ PS1.a & $L$ & & &... & &... & & & $\surd$ & ... & & ... & ... \\
}
~\newline
~\newline
\textbf{A10}. The deflection of the beam is caused by bending moment only, the shear does not contribute.\\
\textbf{A10}. The deflection of the beam is caused by bending moment only, the
shear does not contribute.\\
%\textbf{A15}. The beam behaves as a rigid body
\end{frame}
......@@ -1236,10 +1281,12 @@ at the end of a word.}
\begin{itemize}
\item Program family idea since the 1970s (Dijkstra, Parnas, Weiss, Pohl, ...) - variabilities are often from a finite
set of simple options \cite{Parnas1976, Parnas1979, Dijkstra1972}
\item Families of algorithms and code generation in SC (Carette, ATLAS, Blitz++, ...) - not much emphasis on
requirements \cite{Carette2006, WhaleyEtAl2001, Veldhuizen1998, Blitz2010}
\item Program family idea since the 1970s (Dijkstra, Parnas, Weiss, Pohl, ...) --
variabilities are often from a finite set of simple options \cite{Parnas1976,
Parnas1979, Dijkstra1972}
\item Families of algorithms and code generation in SC (Carette, ATLAS, Blitz++,
...) -- not much emphasis on requirements \cite{Carette2006, WhaleyEtAl2001,
Veldhuizen1998, Blitz2010}
%\item Problem Solving Environments (PSEs)
\item Work on requirements for SC
\begin{itemize}
......@@ -1520,10 +1567,11 @@ $n: \mathbb{N}$ & number of linear equations/number of unknowns\\
$A: \mathbb{R}^{n \times n}$ & $n \times n$ real matrix\\
$x: \mathbb{R}^{n \times 1}$ & $n \times 1$ real column vector\\
$b: \mathbb{R}^{n \times 1}$ & $n \times 1$ real column vector\\
$I: \mathbb{R}^{n \times n}$ & an $n \times n$ matrix where all entries are $0$, except for the diagonal entries, which
are $1$\\
$I: \mathbb{R}^{n \times n}$ & an $n \times n$ matrix where all entries are $0$,
except for the diagonal entries, which are $1$\\
$|| v || $ & the norm (estimate of magnitude) of vector $v$\\
$A^{-1}: \mathbb{R}^{n \times n}$ & the inverse matrix, with the property that $A^{-1} A = I$\\
$A^{-1}: \mathbb{R}^{n \times n}$ & the inverse matrix, with the property that
$A^{-1} A = I$\\
singular & matrix $A$ is singular if $A^{-1}$ does not exist\\
residual & $|| b - A x ||$\\
\end{tabular}
......@@ -1539,7 +1587,8 @@ residual & $|| b - A x ||$\\
\begin{itemize}
\item \structure{What would be the most general binding time for the variabilities?}
\item \structure{What would be the most general binding time for the
variabilities?}
\end{itemize}
......
No preview for this file type
......@@ -43,10 +43,10 @@
\frametitle{Verification and Validation}
\bi
\item TO DO - cite
\item
\href{https://ideas-productivity.org/assets/artifacts/hpcbp/hpcbp-083-gettingitright.pdf}
{Cohen2024} presentation ``Getting it Right: System Testing of Scientific
Software''
Software'' (similar content to these slides)
\item Administrative details
\item Questions?
\item 741 workflow
......@@ -68,11 +68,11 @@ template}
\frametitle{Administrative Details}
\bi
\item SRS Presentation grades on Avenue
\item SRS Presentation grades on Avenue (well done!)
\item Create GitHub issues for your colleagues (see next slide)
\item Go ahead and address the colleague created issues
\item No classes for Reading week %(Feb 20 -- Feb 24)
\item Go over final rubric, especially challenge level and extras
%\item Go over final rubric, especially challenge level and extras
\item First submission of docs is formative (feedback, not highly weighted),
final submission is summative
\ei
......@@ -490,7 +490,7 @@ From \cite{GhezziEtAl2003}
\item \structure{If our code passes all test cases, is it now guaranteed to be
error free?}
\item \structure{Are 5000 random tests always better than 5 carefully selected
\item \structure{Are 5000 random tests always better than 15 carefully selected
tests?}
\end{itemize}
......
No preview for this file type
......@@ -93,7 +93,8 @@
\begin{itemize}
\item
\href{https://gitlab.cas.mcmaster.ca/smiths/cas741/-/commit/0bdea9edc7464bb57c2f3524bebfd4f3b59cdc80}
{Some Domain Expert and Secondary Expert assignments have changed}
{Some Domain Expert assignments have changed}
\item Yasmin dropped the course, so Bo will need to find another project to evaluate
\end{itemize}
\end{frame}
......@@ -111,6 +112,71 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Goals of Testing}
\begin{itemize}
\item \structure{If our code passes all test cases, is it now guaranteed to be
error free?}
\item \structure{Are 5000 random tests always better than 15 carefully selected
tests?}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Goals of Testing}
\begin{itemize}
\item To show the \structure{presence} of bugs (Dijkstra, 1972)
\item If tests do not detect failures, we cannot conclude that software is defect-free
\item Still, we need to do testing - driven by sound and systematic principles
\begin{itemize}
\item Random testing is often not a systematic principle to use
% look at the example from the text, or divide by zero within a circular range
\item Need a test plan
\end{itemize}
\item Should help isolate errors - to facilitate debugging
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Goals of Testing Continued}
\begin{itemize}
\item Should be repeatable
\begin{itemize}
\item Repeating the same experiment, we should get the same results
\item Repeatability may not be true because of the effect of the execution
environment on testing
\item Repeatability may not occur if there are uninitialized variables
\item Repeatability may not happen when there is nondeterminism
\end{itemize}
\item Should be accurate
\begin{itemize}
\item Accuracy increases reliability
\item Part of the motivation for formal specification
\end{itemize}
\item \structure{Is a \structure{successful} test case one that passes the test, or one
that shows a failure?}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Test (V\&V) Plan}
......@@ -1015,6 +1081,7 @@ Summary of most points below in \cite{Smith2016}
\href{https://www.evoketechnologies.com/code-review-checklist-perform-effective-code-reviews/}{Sample
checklists}
\ei
\item \href{https://gitlab.cas.mcmaster.ca/SEforSC/se4sc/-/blob/git-svn/GradStudents/Cynthia/M.EngReport/Thesis_Main.pdf?ref_type=heads} {Cynthia Liu's SC Requirements Validation Techniques}
\end{itemize}
\end{frame}
......
No preview for this file type
......@@ -64,6 +64,7 @@
\bi
\item For the design documentation you do not have to use the MG and
MIS templates
\item No lecture on Friday, March 21
%\item GitHub issues
%\bi
% \item When closing issues give the hash for the corresponding commit
......@@ -89,44 +90,44 @@ MIS templates
\input{../Deadlines.tex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Feedback on SRS}
\begin{itemize}
\item
\href{https://github.com/smiths/capTemplate/blob/main/docs/Checklists/SRS-Checklist.pdf}
{SRS checklist}
\begin{itemize}
\item Follow the template
\item Filename for SRS from template (new)
\item All symbols are in the table of contents
\item Project is given a name
\item Characteristics with courses and level (clarified)
\item Goal statements are functional (new)
\item Each assumption is used at least once
\item All chunks are used at least once (new)
\item IMs are referenced by requirements
\end{itemize}
\end{itemize}
\end{frame}
% \begin{frame}
% \frametitle{Feedback on SRS}
% \begin{itemize}
% \item
% \href{https://github.com/smiths/capTemplate/blob/main/docs/Checklists/SRS-Checklist.pdf}
% {SRS checklist}
% \begin{itemize}
% \item Follow the template
% \item Filename for SRS from template (new)
% \item All symbols are in the table of contents
% \item Project is given a name
% \item Characteristics with courses and level (clarified)
% \item Goal statements are functional (new)
% \item Each assumption is used at least once
% \item All chunks are used at least once (new)
% \item IMs are referenced by requirements
% \end{itemize}
% \end{itemize}
% \end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Feedback on SRS}
\begin{itemize}
\item
\href{https://github.com/smiths/capTemplate/blob/main/docs/Checklists/Writing-Checklist.pdf}
{Writing checklist}
\begin{itemize}
\item Opening and closing ``quotes''
\item Periods that do not end sentences are followed by only one space
\item Long names in math mode use either mathit or text
\item Document is spell checked
\item Symbols formatted the same way in every context %inside and outside equations
\end{itemize}
\item Types information very helpful
\end{itemize}
\end{frame}
% \begin{frame}
% \frametitle{Feedback on SRS}
% \begin{itemize}
% \item
% \href{https://github.com/smiths/capTemplate/blob/main/docs/Checklists/Writing-Checklist.pdf}
% {Writing checklist}
% \begin{itemize}
% \item Opening and closing ``quotes''
% \item Periods that do not end sentences are followed by only one space
% \item Long names in math mode use either mathit or text
% \item Document is spell checked
% \item Symbols formatted the same way in every context %inside and outside equations
% \end{itemize}
% \item Types information very helpful
% \end{itemize}
% \end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -242,12 +243,12 @@ MIS templates
\begin{frame}
\frametitle{SWHS MG Example}
~\\
\href{https://github.com/smiths/swhs/blob/master/docs/Design/MG/PCM_MG.pdf}
{https://github.com/smiths/swhs/blob/master/docs/Design/MG/PCM_MG.pdf}
\href{https://github.com/smiths/swhs/blob/master/docs/Design/MG/PCM_MG.pdf} {Module Guide for Solare Water Heating System Incorporating Phase Change Material (PCM)}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{What is Design?}
\begin{itemize}
......
No preview for this file type
......@@ -45,11 +45,10 @@
\frametitle{Module Interface Specification (MIS)}
\bi
\item ADD STRATEGY DESIGN PATTERN
\item Administrative details
\item Questions?
%\item Finish previous day slides
\item Module guide example
%\item Module guide example
\item Mathematical fundamentals
\item MIS example
\item Integration testing
\item MIS overview
......@@ -67,28 +66,12 @@
\frametitle{Administrative Details}
\bi
% \item When developing your code, remember that your goal is for someone else to
% be able to compile and run it
% \item Upcoming classes
% \bi
% \item L15 - Module Interface Specification
% \item L16 - Math Review + MIS
% \item L17 - POC + MG Presentations
% \item L18 - MIS Presentations
% \ei
\item Friday's class in ITB/201
\item Mathematical review
\begin{itemize}
\item \cite{HoffmanAndStrooper1995}
\item \href{https://gitlab.cas.mcmaster.ca/smiths/cas741/-/tree/master/Lectures/MathReviewPlusExample} {Review Slides}
\item \href{https://gitlab.cas.mcmaster.ca/smiths/se2aa4_cs2me3/-/blob/master/MISFormat/MISFormat.pdf} {MIS Format}
\end{itemize}
\item Potential software for drawing figures
\bi
\item \href{https://app.diagrams.net/} {draw.io}
\item \href{https://www.bu.edu/math/files/2013/08/tikzpgfmanual.pdf} {Tikz}
\ei
\item Go over final grading rubric, traceability Rev0 to Rev1
%\item Go over final grading rubric, traceability Rev0 to Rev1
\ei
\end{frame}
......@@ -142,10 +125,29 @@
\begin{frame}
\frametitle{Emphasis}
\begin{itemize}
\item Math notation (stoichiometry example on Friday)
\item GUI modules (environment variables)
\item Math notation
\item Modules with external interaction (environment variables)
\item Types of modules
\item Abstract Data Types (graph example)
\item Qualities of an interface
\item Design patterns
\begin{itemize}
\item Adapter (Wrapper) pattern
\item Strategy pattern
\end{itemize}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Mathematical review}
\begin{itemize}
\item Hoffman and Strooper (1995) \cite{HoffmanAndStrooper1995}
\item \href{https://gitlab.cas.mcmaster.ca/smiths/se2aa4_cs2me3/-/blob/master/MISFormat/MISFormat.pdf} {MIS Format}
\item \href{https://gitlab.cas.mcmaster.ca/smiths/cas741/-/tree/master/Lectures/MathReviewPlusExample} {Stoichiometry Example} %not a great approach, can tell by bad names
\item MoleculeT = seq[108] of $\mathbb{N}$
\end{itemize}
\end{frame}
......
Lectures/L16_MISContinued/500px-AdapterPatternForWiki.jpg

18.6 KiB

No preview for this file type
......@@ -45,6 +45,7 @@
\frametitle{MIS Continued}
\bi
\item ADD STRATEGY DESIGN PATTERN
\item Administrative details
\item Questions?
\item Review: Records, Libraries, ADTs, Abstract Objects, Generic ADTs
......@@ -94,6 +95,24 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Emphasis}
\begin{itemize}
\item Math notation
\item Modules with external interaction (environment variables)
\item Types of modules
\item Abstract Data Types
\item Qualities of an interface
\item Design patterns
\begin{itemize}
\item Adapter (Wrapper) pattern
\item Strategy pattern
\end{itemize}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \begin{frame}
% \frametitle{Nonfunctional Requirements}
% \begin{itemize}
......@@ -1084,6 +1103,217 @@ where $a$, $b$ and $c$ are suitable constants
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Design Patterns}
\begin{itemize}
\item Christopher Alexander (1977, buildings/towns):
\begin{itemize}
\item ``Each pattern describes a problem which occurs over and over again in our
environment, and then describes the core of the solution to that problem, in
such a way that you can use this solution a million times over, without ever
doing it the same way.''
\end{itemize}
\item Design reuse (intended for OO)
\item Solution for recurring problems
\item Transferring knowledge from expert to novice
%\item Provides language for communicating about design
\item A design pattern is a recurring structure of communicating components that
solves a general design problem within a particular context
\item Design patterns consist of multiple modules, but they do not constitute an
entire system architecture
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Adapter Design Pattern}
\includegraphics[scale=0.7]{500px-AdapterPatternForWiki.jpg}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Adapter UML Diagram}
% client uses target (follows targets interface)
% client, adapter and adaptee appear as in previous slide
\medskip
\includegraphics[scale=0.7]{adapter_clip.pdf}
\href{https://en.wikipedia.org/wiki/Adapter_pattern}
{Wikipedia entry}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{SimUDuck Example}
\bigskip
\includegraphics[scale=0.74]{StratPat-SimUDuck.pdf}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Adding a Fly Method}
\bigskip
\includegraphics[scale=0.85]{StratPat-FlyMethod.pdf}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Rubber Duck Problem}
\includegraphics[scale=0.7]{StratPat-RubberDuck.pdf}
\structure{How to stop rubber ducks from flying?} %override to do nothing
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Rubber Duck Problem Continued}
\bi
\item Solve problem by overriding the fly() method to do nothing
\item Not a good solution - think of the potential maintenance problems if we
add wooden decoys, which cannot fly, or quack - what about different quacks?
\ei
Which of the following are disadvantages of using inheritance to provide Duck
behaviour?
\begin{enumerate}[A.]
\item Some code is duplicated across subclasses
\item Runtime behaviour changes are difficult
\item Difficult to gain knowledge of all duck behaviours
\item Changes can unintentionally affect other ducks
\item All of the above %answer
\end{enumerate}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{How About an Interface?}
\includegraphics[scale=0.75]{StratPat-Interface.pdf}
Disadvantages of interface?
\begin{enumerate}[A.]
\item Maintenance nightmare - the different options for fly and quack are
duplicated everywhere %answer
\item Ducks that have fly and quack are clearly shown
\item All of the above
\end{enumerate}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Information Hiding}
How can the principle of information hiding help us?
\begin{enumerate}[A.]
\item Identify the aspects of the application that are likely to change and
separate them from what is unlikely to change
\item Provide a means for part of the system to vary independently of the other
parts
\item Prevent the program's user from knowing which ducks can fly and/or quack
\item A and B %answer
\item A, B and C
\end{enumerate}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Separate Out Changeable Parts (Likely Changes)}
\bigskip
\includegraphics[scale=0.85]{StratPat-DuckBehaviours.pdf}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Implementing the Duck Behaviours}
\bigskip
\includegraphics[scale=0.66]{StratPat-ImpDuckBehaviours.pdf}
\bi
\item Program to an interface not an implementation (interface in the sense we have
used it for MISes, not just a Java interface)
\item Other modules can use these behaviours too
\item Can add new behaviours without touching the original Duck class
\ei
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{The Big Picture}
\bigskip
\includegraphics[scale=0.66]{StratPat-BigPicture.pdf}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Often Favour Composition over Inheritance}
\bi
\item Composition provides a ``has a'' relationship, as opposed to an ``is a''
relationship
\item Composition provides greater flexibility
\item Composition allows changing behaviour at runtime
\item Many languages (like Java) do not allow multiple inheritance, but can have
multiple compositions
\ei
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Strategy Pattern}
Defines a family of algorithms, encapsulates each one, and makes them
interchangeable. Strategy lets the algorithm vary independently from the
clients that use it.
\includegraphics[scale=0.6]{Strategy1.png}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[allowframebreaks]
\frametitle{References}
......
File added
File added