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

A2 edits - |Z|>0 required for chance of exception, Exceptions and tests not...

A2 edits - |Z|>0 required for chance of exception, Exceptions and tests not required to be documented
parent 8640ba1f
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -93,7 +93,8 @@ break under a specified blast load.
Write a module that creates a Curve ADT. It should consist of a Python code
file named {\tt CurveADT.py}. The specification for this module is given at the
end of the assignment. The exceptions for {\tt CurveADT.py} (and all other
modules) should be in the file {\tt Exceptions.py}. Hint: The implementation
modules) should be in the file {\tt Exceptions.py}. (The {\tt Exceptions.py}
file does not need to be documented with doxygen.) Hint: The implementation
will be easier if you use the scipy function
\href{https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html}{\texttt{interp1d}}.
......@@ -128,16 +129,17 @@ this module is given at the end of the assignment.
\section *{Step \refstepcounter{stepnum} \thestepnum}
Write a module (named {\tt test\_All.py}), using Pytest, that tests the following
modules: {\tt CurveADT.py}, {\tt Data.py} and {\tt SeqServices.py}. The given
makefile {\tt Makefile} will have the rule \texttt{test} for running your tests.
Each procedure should have at least one test case. Record your rationale for
test case selection and the results of using this module to test the procedures
in your modules. (You will submit your rationale with your report in
Step~\ref{StepReport}.) Please make an effort to test normal cases, boundary
cases, and exception cases. Your test program should compare the calculated
output to the expected output and provide a summary of the number of test case
that have passed or failed.
Write a module (named {\tt test\_All.py}), using Pytest, that tests the
following modules: {\tt CurveADT.py}, {\tt Data.py} and {\tt SeqServices.py}.
The given makefile {\tt Makefile} will have the rule \texttt{test} for running
your tests. Each procedure should have at least one test case. Record your
rationale for test case selection and the results of using this module to test
the procedures in your modules. (You will submit your rationale with your
report in Step~\ref{StepReport}.) Please make an effort to test normal cases,
boundary cases, and exception cases. Your test program should compare the
calculated output to the expected output and provide a summary of the number of
test case that have passed or failed. You do not need to put doxygen comments
in your {\tt test\_All.py} file.
For testing {\tt CurveADT.py}, do not worry about test cases close to edges of
the domain. The formulas for interpolation and differentiation will break down
......@@ -150,7 +152,7 @@ Test the supplied \texttt{Makefile} rule for {\tt doc}. This rule should
compile your documentation into an html and \latex version. Your documentation
will be generated to the \texttt{A1} folder. Along with the supplied
\texttt{Makefile}, a doxygen configuration file is also given in your initial
repo. You should change these files.
repo. You should not change these files.
  • Contributor

    Big difference! :joy::100:

  • Author Owner

    Yes, it is a big difference. Fortunately this change doesn't mean any more work for anyone. :smile:

  • Please register or sign in to reply
\section *{Step \refstepcounter{stepnum} \thestepnum}
......@@ -246,16 +248,22 @@ changes.
exceptions. Your exceptions should have exactly the same name, including
case, as given in the specification. Your exceptions should inherit from the
Exception class and they should only be used with one argument, a string
explaining what problem has occurred.
explaining what problem has occurred. All Exceptions should be in a file
\texttt{Exceptions.py}. This file does not have to be documented via doxygen.
\item For the Python implementation of the abstract module, your access programs
should be called via, \texttt{Data.accessProg}, not \texttt{Data\_accessProg},
as shown in the specification. The call \texttt{Data.Data\_accessProg} is
should be called via, \texttt{Data.accessProg}, not simply \texttt{accessProg}
or \texttt{Data\_accessProg}. The call \texttt{Data.Data\_accessProg} is
also incorrect. Some sample calls include the following: \texttt{Data.init()},
\texttt{Data.add(s, z)}, etc.
\item Since the specification is silent on this point, for methods that return
an object, or use objects in their state, you can decide to either use
references or construct new objects. The implementation will be easier if you
just work in terms of references to objects.
\item A sample program (\texttt{A2Examples.py}) that uses the modules in this
specification is available in the repo. You can use this to do an initial
test that your interface matches the specification.
\item A sample file (\texttt{glass.csv}) is available in the repo. You can use
this file to visualize the first 10 curves from Figure~\ref{Fig_ASTM_F2248-09}.
\end{itemize}
\item \textbf{Your grade will be based to a significant extent on the ability of
your code to compile and its correctness. If your code does not compile,
......@@ -457,7 +465,9 @@ Data\_init():
\noindent Data\_add($s, z$):
\begin{itemize}
\item transition: $S, Z := S || <s>, Z || <z>$
\item exception: $exc := (|S| = \mbox{MAX\_SIZE} \Rightarrow \mbox{Full} | z
\item exception: $exc := (|S| = \mbox{MAX\_SIZE} \Rightarrow \mbox{Full } |
\mbox{ } |Z| >
0 \wedge z
\leq Z_{|Z|-1} \Rightarrow \mbox{IndepVarNotAscending})$
\end{itemize}
......
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