Question: Question 1 ( 1 5 points ) : Based on the example in the slide to create a Point class. In addition to the basic
Question 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 points:
Create a module named hpy 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 and
Create a new method moveTo which accepts two variables: newX, newY. This method will move the point to newXnewY
Create an instance of Point, and call all the methods you have defined
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
