Question: Question 1 ( 1 5 points ) : Based on the example in the slide to create a Point class. In addition to the basic

Question 1(15 points):
Based on the example in the slide to create a Point class. In addition to the basic requirements for the class described in the slide, you have to create a new method called "move" that takes two parameters as the new location of the point by updating both coordinates.
Create an instance of Point, and call all the methods you have defined .
To complete the program (10 points):
Create a module named h11_01.py from the directory hw
Record your name, class number, and date of creation.
Create a class called Point with all the attributes and methods described in the slide (refer to slide 14 and 15)
Create a new method moveTo(), which accepts two variables: newX, newY. This method will move the point to (newX,newY).
Create an instance of Point, and call all the methods you have defined
Question 1 ( 1 5 points ) : Based on the example

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!