Fields & Methods
Q1, Q2, Q3, Q4
There are four elements of the Quadrant enumeration: Q1,...
Computers and Technology, 30.03.2021 21:00 querty2400
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
Answers: 3
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
Computers and Technology, 22.06.2019 19:00
If your accelerator suddenly gets stuck what should you do
Answers: 2
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
Computers and Technology, 23.06.2019 08:00
Match the items with their respective descriptions.
Answers: 1
German, 14.06.2021 14:00
Social Studies, 14.06.2021 14:00
English, 14.06.2021 14:00
Law, 14.06.2021 14:00
English, 14.06.2021 14:00
Physics, 14.06.2021 14:00
English, 14.06.2021 14:00
Mathematics, 14.06.2021 14:00
English, 14.06.2021 14:00
Mathematics, 14.06.2021 14:00
Mathematics, 14.06.2021 14:00
Mathematics, 14.06.2021 14:00