Write a Python program that creates uses and tests an ADT

Assignment Help Software Engineering
Reference no: EM131868861

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

Reference no: EM131868861

Questions Cloud

Probability that a customer purchase : A customer will purchase all 3 items with probability 0.06. What's the probability that a customer purchase:
Draw a diagram for z-score : Draw a diagram (as neatly as possible) for each z-score and label all the areas. Clearly mention the proportion of area in the three cases
Conduct a careful analysis of your approach and insight : Conduct a careful analysis of your approach, insight, and self-knowledge resulting from completing the case studies.
Calculate z-scores for the four profits : The annual profits of small business owners in the town of Brownville has a normal distribution with mean $50,000 and standard deviation $4000.
Write a Python program that creates uses and tests an ADT : COMP SCI 2ME3 and SFWR ENG 2AA4 Assignment. Write a Python program that creates, uses, and tests an ADT, an Abstract Object and libraries related to processing
Standard deviations from the mean : In a distribution that follows the normal curve. How likely is it that an observation is greater than one standard deviations from the mean? Explain why.
Exact shape of the normal distribution : The 1-2-3 rule says that regardless of the exact shape of the normal distribution, 68.26% of all observations are within +1 and -1 s.d. of the mean
Analyze the proposal based on the provided evaluation factor : Analyze the proposal based on the provided Evaluation factors. Here you should determine what to look for in an adequate proposal
Scenario of an ideal world : What would be your ideal situation if you are the defendant?

Reviews

len1868861

2/19/2018 2:25:28 AM

Subject: Software engineering. Detailed Question: Need to write python code. Only for part 1. Can provided sample solution from last year. Your git repo will be organizes with the following directories at the top level: A1, A2, A3, and A4. Inside the A2 folder you will start with initial stubs of the files and folders that you need to use. Please do not change the names or locations of any of these files or folders.

len1868861

2/19/2018 2:25:22 AM

Please put your name and macid at the top of each of your source files, except for those that you share with a partner. Including your name and macid is optional for those files. Your program must work in the ITB labs on mills when compiled with its versions of Python (version 3), LaTeX, doxygen and make Python specifics: The exceptions in the specification should be implemented via Python 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. All Exceptions should be in a file Exceptions.py. This file does not have to be documented via doxygen. For the Python implementation of the abstract module, your access programs should be called via, Data.accessProg, not simply accessProg or Data accessProg. The call Data.Data accessProg is also incorrect. Some sample calls include the following: Data.init(), Data.add(s, z), etc.

len1868861

2/19/2018 2:25:15 AM

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. A sample program (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. A sample file (glass.csv) is available in the repo. You can use this file to visualize the first 10 curves from Figure 1.

len1868861

2/19/2018 2:25:08 AM

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, then your grade will be significantly reduced. Any changes to the assignment specification will be announced in class. It is your responsibility to be aware of these changes. Please monitor all pushes to the course git repo.

Write a Review

Software Engineering Questions & Answers

  Research report on software design

Write a Research Report on software design and answer diffrent type of questions related to design. Report contain diffrent basic questions related to software design.

  A case study in c to java conversion and extensibility

A Case Study in C to Java Conversion and Extensibility

  Create a structural model

Structural modeling is a different view of the same system that you analyzed from a functional perspective. This model shows how data is organized within the system.

  Write an report on a significant software security

Write an report on a significant software security

  Development of a small software system

Analysis, design and development of a small software system.

  Systems analysis and design requirements

Systems Analysis and Design requirements

  Create a complete limited entry decision table

Create a complete limited entry decision table

  Explain flow boundaries map

Explain flow boundaries map the dfd into a software architecture using transform mapping.

  Frame diagrams

Prepare a frame diagram for the software systems.

  Identified systems and elements of the sap system

Identify computing devices, which could be used to support Your Improved Process

  Design a wireframe prototype

Design a wireframe prototype to meet the needs of the personas and requirements.

  Explain the characteristics of visual studio 2005

Explain the characteristics of Visual Studio 2005.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd