Add the following accessor method to the Point class: public int quadrant() Returns which quadrant of the

Question:

Add the following accessor method to the Point class:

public int quadrant()

Returns which quadrant of the x/y plane the current Point object falls in. Quadrant 1 contains all points whose x and y values are both positive. Quadrant 2 contains all points with negative x but positive y. Quadrant 3 contains all points with negative x and y values. Quadrant 4 contains all points with positive x but negative y. If the point lies directly on the and/or axis, return 0.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: