subject

Please solve this in JAVA. Ps: This is not the exacy same program as previous one where it has an enum SIGNUM it's similar but not same this one is only enum Quadrant so please solve this according to the question and not just copy paste from the old problems. Quadrant (the code):
public enum Quadrant {
// code
}
We will model the four quadrants with a Java enumeration which will contain only 4 elements and a few methods. The enumeration will have a main() method that takes command line arguments that are pairs of numbers and prints which quadrant the pair belongs to.
Note that there is some ambiguity as to which quadrant pairs with a 0 belong in: the pair (0, 11) exists on the boundary between Q1 and Q2 while the origin (0,0) could be said to belong to any of the quadrants. We will dodge that issue by not testing such cases so your code may behave any way you wish.
Fields & Methods:
Q1, Q2, Q3, Q4
There are four elements of the Quadrant enumeration: Q1, Q2, Q3, Q4. Ensure that these are all present and no other exist.
public boolean xPositive();
public boolean yPositive();
These two simple accessors indicate whether the coordinates of the Quadrant are positive or negative. In order to make this functionality easy, it is helpful to define some private fields and a private constructor.
public String signPair()
Quadrants can return a pretty string which indicates the sign of the x and y values they contain. These are the strings
(+,+) for Q1
(-,+) for Q2
(-,-) for Q3
(+,-) for Q4
public Quadrant flipX();
For a coordinate (x, y) in this Quadrant, method flipX() should return the Quadrant that would the coordinate (-x, y) would belong to.
public static Quadrant fromInts(int x, int y)
This function returns the Quadrant in which the pair (x, y) would fall. As noted earlier, if x or y are 0, multiple quadrants apply. Return any valid choice in such cases but know that this case will not be tested in the test cases.
Example
From an interactive session in DrJava
Welcome to DrJava.
> Quadrant q = Quadrant. fromInts(1,4);
> q
Q1
> q = Quadrant. fromInts(11,-34);
> q

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:20
Cengagenowv2 is a comprehensive online learning tool. using cengagenowv2, you may access all of the following except: 2. each time you log in, cengagenowv2 automatically performs a system check and informs you if your computer does not meet the cengagenowv2 system requirements. 3. which tab/page allows you to easily track your assignment scores, number of submissions, time spent, as well as the ability view assign
Answers: 3
question
Computers and Technology, 23.06.2019 01:00
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan.in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan.out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
question
Computers and Technology, 25.06.2019 04:30
He 98 pointsss how has computers changed over the years? how can they be used now? give details and such!
Answers: 1
question
Computers and Technology, 25.06.2019 09:00
What do students buy when they pay tuition? o a place to live at a school o the right to attend classes at a school o transportation expenses to attend classes o textbooks
Answers: 2
You know the right answer?
Please solve this in JAVA. Ps: This is not the exacy same program as previous one where it has an en...
Questions
question
Mathematics, 25.11.2020 19:50
question
Computers and Technology, 25.11.2020 19:50
question
Mathematics, 25.11.2020 19:50
question
Computers and Technology, 25.11.2020 19:50
Questions on the website: 13722363