PART A: Recall that a Line is defined by two Points in the (x, y) plane. Write class Line where one object represents a Line; the Line object is stored as two Point objects, start and end. Define appropriate instance variables and the following instance m

technical writing

Description

PART A: Recall that a Line is defined by two Points in the (x, y) plane. Write class Line where one object represents a Line; the Line object is stored as two Point objects, start and end. Define appropriate instance variables and the following instance methods: init__() sets the initial values for start and end to the two Point objects that are passed in through its parameters. Assume that the caller (e.g. main) passes in two Point objects to this method (i.e. no error checking required.) __str__() returns a string representation of the object that calls it. PART B: Write an additional method for class Line: length() method returns the length of the line. Recall that the length of a line with start point (startX, startY) and end point (endX, endY) is: square root of ( (startX-endX)2 + (startY-endY)2 ) ) PART C: Write a main program that thoroughly tests class Line from the previous two PARTS. Please submit all parts separately, not as one whole program. Thank You!


Related Questions in technical writing category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.