subject

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.
Welcome to DrJava.
> Quadrant q = Quadrant. fromInts(1,4);
> q Q1
> q = Quadrant. fromInts(11,-34);
> q Q4

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:30
Which of the following are types of formatting you can apply to a spreadsheet? choose all that apply.
Answers: 3
question
Computers and Technology, 22.06.2019 19:00
If your accelerator suddenly gets stuck what should you do
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
Match the items with their respective descriptions.
Answers: 1
You know the right answer?
Fields & Methods Q1, Q2, Q3, Q4
There are four elements of the Quadrant enumeration: Q1,...
Questions
question
English, 14.06.2021 14:00
question
Mathematics, 14.06.2021 14:00
question
Mathematics, 14.06.2021 14:00
Questions on the website: 13722361