Earn Higher Grades With Instant Assignment Help.Ask Question!

Python Programming
(5/5)

Complete the codebase for TwoDPoint, Quarilateral, Rectangle, and The incomplete portions of the code are marked with TODO and the methods are provided with documentation explaining

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Assignment 5: Object-oriented programming and unit testing in Python

There is some code being given to you for the classes being used. These are:

  1. two_d_point.py
  2. quadrilateral.py
  3. rectangle.py
  4. square.py

 

Additionally, there are also some test class skeletons also provided (test_two_d_point.py and

test_quadrilateral.py). Your tasks are as follows:

  1. Complete the codebase for TwoDPoint, Quarilateral, Rectangle, and The incomplete portions of the code are marked with TODO and the methods are provided with documentation explaining what each incomplete method should do.

TwoDPoint (8 points)

Quadrilateral (10 points)

Rectangle (10 points)

Square (8 points)

  1. Write a class called ShapeSorter (the file name must be py) with a method called sort. This method should take as its argument a variable number of quadrilaterals (i.e., *args) and return a list of these shapes sorted in increasing order of their smallest x-coordinate. You must also decide if this method should be an instance, static, or class method. (14 points)
  2. Every shape (i.e., quadrilateral, rectangle, and square) must also use the appropriate magic methods to check for equality and to have a human-readable string representation of an instance of the (10 points)
  3. Any method you write in the above tasks must also have corresponding unit tests in the properly named test classes. You are required to follow the naming conventions of the unit test classes and methods as shown by the two test class skeletons (30 points)

The sorting method must have at least 4 unique test cases, one of which must be a boundary value. The snap and membership checking methods must have at least 2 unique test cases (each).

  1. Any method you write (except for the unit tests) must also have complete type hints for the methods arguments and return For this, do not use any imports from the future module. The given codebase already shows you how to do this. (10 points)

Unimplemented (or mostly unimplemented) methods with just the type hints added to the signature will not be given points for this task.

Attachments:
(5/5)

Expert's Answer

10 Times Downloaded

Related Questions

CSI 1420 Introduction to C Programming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu

The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

10 Times Downloads

Ask This Assignment To Be Done By Our ExpertsGet A+ Grade Solution Guaranteed

expert
joyComputer science
(4/5)
12 Answers Hire Me
expert
Robert DLaw
(4.8/5)
526 Answers Hire Me
expert
Dr Samuel BarberaStatistics
(5/5)
611 Answers Hire Me
expert
Tutor For YouEconomics
(5/5)
757 Answers Hire Me