Comp sci 2me3 and sfwr eng 2aa4 assignment write a python


Assignment

Introduction - The purpose of this software design exercise is to write a Python program that creates, uses, and tests an ADT, an Abstract Object and libraries related to processing and plotting curves and sequences of curves. As for the previous assignment, you will use doxygen, make, LaTeX and Python (version 3). In addition, this assignment will use PyTest for unit testing. This assignment also takes advantage of functional programming in Python.

All of your code, except for the testing files, which are optional, should be documented using doxygen. Your report should be written using L ATEX. Your code should follow the given specification exactly. In particular, you should not add public methods or procedures that are not specified and you should not change the number or order of parameters for methods or procedures. If you need private methods or procedures, please use the Python convention of naming the files with the double underscore ( methodName ) (dunders).

Part 1 -

Step 1 - Write a module that creates a Curve ADT. It should consist of a Python code file named CurveADT.py. The specification for this module is given at the end of the assignment. The exceptions for CurveADT.py (and all other modules) should be in the file Exceptions.py. (The Exceptions.py file does not need to be documented with doxygen.) Hint: The implementation will be easier if you use the scipy function interp1d.

Step 2 - Write a module that implements an abstract object called Data. It should consist of a Python file named Data.py. The new module should follow the specification given at the end of the assignment. Although efficient use of computing resources is always a good goal, your implementation will be judged on correctness and not on performance. Remember, the exceptions should be defined in the file Exceptions.py.

Step 3 - Write a library module that provides services for processing sequences. It should consist of a Python code file named SeqServices.py. The specification for this module is given at the end of the assignment.

Step 4 - Write a library module for plotting curves. It should consist of a Python code file named Plot.py. The specification for this module is given at the end of the assignment. You should use matplotlib for your implementation. Remember, the exceptions should be defined in the file Exceptions.py.

Step 5 - Write a library module for loading curves into the abstract object Data. It should consist of a Python code file named Load.py. The specification for this module is given at the end of the assignment.

Step 6 - Write a module (named test All.py), using Pytest, that tests the following modules: CurveADT.py, Data.py and SeqServices.py. The given make file Makefile will have the rule 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 10.) 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 test All.py file. For testing CurveADT.py, do not worry about test cases close to edges of the domain. The formulas for interpolation and di
erentiation will break down if they are looking for data outside of the bounds. We don't need to worry about this complication for this assignment.

Step 7 - Test the supplied Makefile rule for doc. This rule should compile your documentation into an html and L ATEX version. Your documentation will be generated to the A1 folder. Along with the supplied Makefile, a doxygen configuration file is also given in your initial repo. You should not change these files.

Step 8 - Submit (add, commit and push) the files CurveADT.py, Data.py, SeqServices.py, Plot.py, Load.py, Exceptions.py and test All.py using git. Please do not change the names and locations for the files already given in your git project repo. You should also push any input data files you created for testing purposes. For Part 1, the only files that you should modify are the Python files and the only \new" files you should create are the input data files. Changing other files could result in a serious grading penalty, since the TAs might not be able to run your code and documentation generation. You should NOT submit your generated documentation (html and latex folders). In general, files that can be regenerated are not put under version control.

You should tag your final submission of Part 1 of the assignment with the label A2Part1.

Part 2 -

Your CurveADT.py, Data.py, SeqServices.py files will automatically be pushed to your partner's repo and vice versa. Including your name in your partner code files is optional.

Step 9 - After you have received your partner's files, replace your corresponding files with your partner's. Do not initially make any modifications to any of the code. Run your test module and record the results. Your evaluation for this step does not depend on the quality of your partner's code, but only on your discussion of the testing results. If the tests fail, for the purposes of understanding what happened, you are allowed to modify your partner's code.

Step 10 -

Write a report using L ATEX (report.tex) following the template given in your repo. The final submission should have the tag A2Part2. The report should include the following:

1. Your name and macid.

2. Your CurveADT.py, Data.py, SeqServices.py, Plot.py, Load.py and test All.py files.

3. Your partner's CurveADT.py, Data.py, SeqServices.py files.

4. The results of testing your files (along with the rational for test case selection). The summary of the results should consist of the following: the number of passed and failed test cases, and brief details on any failed test cases.

5. The results of testing your files combined with your partner's files.

6. A discussion of the test results and what you learned doing the exercise. List any problems you found with (a) your program, (b) your partner's module, and (c) the specification of the modules.

7. Answers to the following questions

  • What is the mathematical specification of the SeqServices access program isInBounds(X, x) if the assumption that X is ascending is removed?
  • How would you modify CurveADT.py to support cubic interpolation?
  • What is your critique of the CurveADT module's interface. In particular, comment on whether the exported access programs provide an interface that is consistent, essential, general, minimal and opaque.
  • What is your critique of the Data abstract object's interface. In particular, comment on whether the exported access programs provide an interface that is consistent, essential, general, minimal and opaque.

Commit and push report.tex and report.pdf. Although the pdf file is a generated file, for the purpose of helping the TAs, we'll make an exception to the general rule of avoiding version control for generated files. If you have made any changes to your Python files, you should also push those changes.

Attachment:- Assignment Files.rar

Request for Solution File

Ask an Expert for Answer!!
Software Engineering: Comp sci 2me3 and sfwr eng 2aa4 assignment write a python
Reference No:- TGS02664358

Expected delivery within 24 Hours