write a point class that represents points on an


Write a Point class that represents points on an x, y axis. The data members should be doubles x and y plus an int value called count that represents the number of points currently instantiated. Your class should have 3 constructors; a default constructor, a copy constructor, and another that allows you to set the x and y values when the Point object is created. Your class should have a finalizer so that the count value always correctly reflects the number of objects currently instantiated. Your class should have get and set methods for both instance variables. Your class should have an equals method that returns true when any object passed in as a parameter has the same values for x and y as the Point object whose method was called. Finally, your class should contain a toString method that prints the Point's values in the following format: Point ( , ) where x value and y value are the values of x and y stored in the object.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: write a point class that represents points on an
Reference No:- TGS0497844

Now Priced at $20 (50% Discount)

Recommended (92%)

Rated (4.4/5)