1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aivan3 [116]
3 years ago
9

Write a static method called quadrant that takes as parameters a pair of real numbers representing an (x, y) point and that retu

rns the quadrant number for that point. Recall that quadrants are numbered as integers from 1 to 4 with the upper-right quadrant numbered 1 and the subsequent quadrants numbered in a counter-clockwise fashion:
Engineering
1 answer:
svetlana [45]3 years ago
7 0

Full Question

Write a static method called quadrant that takes as parameters a pair of real numbers representing an (x, y) point and that returns the quadrant number for that point.

Recall that quadrants are numbered as integers from 1 to 4 with the upper-right quadrant numbered 1 and the subsequent quadrants numbered in a counter-clockwise fashion. Notice that the quadrant is determined by whether the x and y coordinates are positive or negative numbers. If a point falls on the x-axis or the y-axis, then the method should return 0.

Answer

public int quadrant(double x, double y) // Line 1

{

if(x > 0 && y > 0){ //Line 2

return 1;

}

if(x < 0 && y > 0){ // Line 3

return 2;

}

if(x < 0 && y < 0) {// Line 4

return 3;

}

if(x > 0 && y < 0) {// Line 5

return 4;

}

return 0;

}

Explanation:

Line 1 defines the static method.

The method is named quadrant and its of type integer.

Along with the method definition, two variables x and y of type double are also declared

Line 2 checks if x and y are greater than 0.

If yes then the program returns 1

Line 3 checks if x is less than 0 and y is greater than 0

If yes then the program returns 2

Line 4 checks if x and y are less than 0

If yes then the program returns 3

Line 5 checks is x is greater than 0 and y is less than 0

If yes then the program returns 4

You might be interested in
I will definitely rate 5 stars/brainliest!!! HELP PLEASE!!! State University must purchase 1,100 computers from three vendors. V
romanna [79]
Why 1+12+ Y3 < 1100
Says the state of university Need to purchase 1100 computers in total, we have the following answer on the way top
3 0
3 years ago
Discuss with your neighbor your brain as a computer.
Misha Larkins [42]
Senors are a type of device that produce a amount of change to the output to a known input stimulus.
Input signals are signals that receive data by the system and outputs the ones who are sent from it. Hope this helps ;)
6 0
3 years ago
The insulation resistance of a motor operated by an electronic drive is to be tested using a megger. What precaution should you
EleoNora [17]
Use protective gear. Use insulated tools, Wear flame resistant clothing, safety glasses, and insulation gloves, Remove watches or other jewelry, Stand on an insulation mat. 03. Never connect the insulation tester to energized conductors or energized equipment and always follow the manufacturer's recommendations. When installing new electrical machinery or equipment, testing insulation resistance is important for two reasons. First, it ensures that the insulation is in adequate condition to begin operation. ... The test is accomplished by applying DC voltage through the de-energized circuit using an insulation tester. Insulation resistance should be approximately one megohm for each 1,000 volts of operating voltage, with a minimum value of one megohm. For example, a motor rated at 2,400 volts should have a minimum insulation resistance of 2.4 megohms.
4 0
3 years ago
Suppose a large amount of power is required. Which engine would you choose between Otto and Diesel? Why?
Firdavs [7]

Answer:

Otto engine

Explanation:

As we know that

Power = Torque x speed

So we can say that when speed of engine then power of engine also will increases.

The speed of Otto engine is more as compare to Diesel engine so the power of Otto engine is more.But on the other hand torque of Diesel engine is more as compare to Otto engine but the speed is low so the product of speed and torque is more for Otto engine .It means that when requires large amount of power then Otto engine should be use.

6 0
3 years ago
What are the de Broglie frequencies and wavelengths of (a) an electron accelerated to 50 eV (b) a proton accelerated to 100 eV
DaniilM [7]

Answer:

(a) De-Brogie wavelength is 0.173 nm and frequency is 2.42 x 10^16 Hz

(b) De-Brogie wavelength is 2.875 pm and frequency is 4.8 x 10^16 Hz

Explanation:

(a)

First, we need to find velocity of electron. Since, it is accelerated by electric potential. Therefore,

K.E of electron = (1/2)mv² = (50 eV)(1.6 x 10^-19 J/1 eV)

(1/2)mv² = 8 x 10^(-18) J

Mass of electron = m = 9.1 x 10^(-31) kg

Therefore,

v² = [8 x 10^(-18) J](2)/(9.1 x 10^(-31) kg)

v = √1.75 x 10^13

v = 4.2 x 10^6 m/s

Now, the de Broglie's wavelength is given as:

λ = h/mv

where,

h = Plank's Constant = 6.626 x 10^(-34) kg.m²/s

Therefore,

λ = (6.626 x 10^(-34) kg.m²/s)/(9.1 x 10^(-31) kg)(4.2 x 10^6 m/s)

<u>λ = 0.173 x 10^(-9) m = 0.173 nm</u>

The frequency is given as:

Frequency = f = v/λ

f = (4.2 x 10^6 m/s)/(0.173 x 10^(-9) m)

<u>f = 2.42 x 10^16 Hz</u>

(b)

First, we need to find velocity of proton. Since, it is accelerated by electric potential. Therefore,

K.E of proton = (1/2)mv² = (100 eV)(1.6 x 10^-19 J/1 eV)

(1/2)mv² = 1.6 x 10^(-17) J

Mass of proton = m = 1.67 x 10^(-27) kg

Therefore,

v² = [1.6 x 10^(-17) J](2)/(1.67 x 10^(-27) kg)

v = √1.916 x 10^10

v = 1.38 x 10^5 m/s

Now, the de Broglie's wavelength is given as:

λ = h/mv

where,

h = Plank's Constant = 6.626 x 10^(-34) kg.m²/s

Therefore,

λ = (6.626 x 10^(-34) kg.m²/s)/(1.67 x 10^(-27) kg)(1.38 x 10^5 m/s)

<u>λ = 2.875 x 10^(-12) m = 2.875 pm</u>

The frequency is given as:

Frequency = f = v/λ

f = (1.38 x 10^5 m/s)/(2.875 x 10^(-12) m)

<u>f = 4.8 x 10^16 Hz</u>

6 0
3 years ago
Other questions:
  • Using Von Karman momentum integral equation, find the boundary layer thickness, the displacement thickness, the momentum thickne
    14·1 answer
  • A contractor is planning on including several skylights in each unit of a residential development. What type of worker would she
    12·1 answer
  • A flat-plate solar collector is used to heat water by having water flow through tubes attached at the back of the thin solar abs
    8·1 answer
  • What should you, the worker, be aware of with regard to evacuation procedures at your workplace
    15·2 answers
  • What is stress corrosion cracking?
    9·1 answer
  • How many GT2RS cars were made in 2019
    7·2 answers
  • A force measuring instrument comes with a certificate of calibration that identifies two instrument errors and assigns each an u
    12·1 answer
  • Similarity of surface<br>and ground<br>waler​
    9·1 answer
  • I need your help to answer in the picture plss help me!​
    15·1 answer
  • The project's criteria.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!