Question: Implement the Point and Circle classes that are outlined below. Implement each class method according to the method's given Javadoc comment. You do not need

Implement the Point and Circle classes that are outlined below.
Implement each class method according to the method's given Javadoc comment.
You do not need to write any code that calls your methods. Your methods will be called and tested by the Tester.java program. The Tester.java program expects a single input integer between 1 and 3. The Tester.java program then runs one of its three built in test cases./**
This class represents points in the plane.
*/
public class Point
{
private double x;
private double y;
public Point()// default constructor
{
this.x =0.0;
this.y =0.0;
}
/**
Create a Point object with the given coordinates.
@param x x-coordinate value for the new Point object
@param y y-coordinate value for the new Point object
*/
public Point(double x, double y)
{
// implementation
}
/**
Change this Point object to have the given x-coordinate.
@param newX new x-coordinate for this Point object
*/
public void setX(double newX)
{
// implementation
}
/**
Get the x coordinate of this Point object.
@return this Point's x-coordinate
*/
public double getX()
{
// implementation
}
/**
Change this Point object to have the given y-coordinate.
@param newY new y-coordinate for this Point object
*/
public void setY(double newY)
{
// implementation
}
/**
Get the y-coordinate of this Point object.
@return this Point's y-coordinate
*/
public double getY()
{
// implementation
}
/**
Determine if this Point object has the same x-coordinate
and the same y-coordinate as the given Point.
@param p a reference to a second Point object
@return true if the given Point is equal to this Point
*/
public boolean equals(Point p)
{
// implementation
}
/**
Determine which quadrant of the plane this Point is in.
Quadrant 1 has positive x and y coordinates.
Quadrant 2 has negative x coordinates and positice y coordinates.
Quadrant 3 has negative x and y coordinates.
Quadrant 4 has positive x coordinates and negative y coordinates.
Note: The positive x and y axes are in quadranr 1.
The negative x axis is in quarant 2.
The negative y axis is in quadrant 3.
@return the quadrant number of this Point object
*/
public int quadrant()
{
// implementation
}
public String toString()
{
return "Point: ["+ x +","+ y +"]";
}
}

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 Databases Questions!