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.
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.
Step by Step Solution
3.37 Rating (181 Votes )
There are 3 Steps involved in it
public int quadrant if x 0 y 0 ... View full answer
Get step-by-step solutions from verified subject matter experts
