Home /
Expert Answers /
Computer Science /
2-submit-a-java-nile-the-point-class-design-a-class-named-point-that-meets-the-following-requ-pa493
(Solved):
2. Submit a .Java nile: (The Point class) Design a class named Point that meets the following requ ...
2. Submit a .Java nile: (The Point class) Design a class named Point that meets the following requirements: - Two data fields \( x \) and \( y \) for representing a point with getter methods - A no-arg constructor that constructs a point for \( (0,0) \) - A constructor that constructs a point with the specified \( x \) and \( y \) values - Override the equals method. Point \( p 1 \) is said to be equal to point \( p 2 \) if \( p 1 . x==p 2 . x \) and \( p 1 . y== \) p2.y. - Override the hashCode method. (For reference, see the implementation of the Point2D class in the Java API.)