logo Use SA10RAM to get 10%* Discount.
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Dylan CarsonStatistics
(5/5)

759 Answers

Hire Me
expert
Aryan BediComputer science
(5/5)

600 Answers

Hire Me
expert
StatAnalytica ExpertResume writing
(5/5)

851 Answers

Hire Me
expert
malvin kengeEngineering
(/5)

813 Answers

Hire Me
Python Programming

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.

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. 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

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme

Get Free Quote!

297 Experts Online