This document defines a Point class to represent points in a plane with x and y coordinates. The class includes methods to access and set the coordinates, calculate the distance from the origin, compare points for equality, and transform points by rotating, rescaling, or calculating the midpoint between two points. The main function demonstrates using the class by inputting points, performing operations on them like distance and midpoint calculations, and outputting the results.
This document defines a Point class to represent points in a plane with x and y coordinates. The class includes methods to access and set the coordinates, calculate the distance from the origin, compare points for equality, and transform points by rotating, rescaling, or calculating the midpoint between two points. The main function demonstrates using the class by inputting points, performing operations on them like distance and midpoint calculations, and outputting the results.
This document defines a Point class to represent points in a plane with x and y coordinates. The class includes methods to access and set the coordinates, calculate the distance from the origin, compare points for equality, and transform points by rotating, rescaling, or calculating the midpoint between two points. The main function demonstrates using the class by inputting points, performing operations on them like distance and midpoint calculations, and outputting the results.