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
ella [17]
2 years ago
12

1. Add the following method to the Point class:

Computers and Technology
1 answer:
Pachacha [2.7K]2 years ago
4 0

Answer:

Explanation:

The following code is written in Java and creates all of the methods that were requested in the question. There is no main method in any of these classes so they will have to be called from the main method and call one of the objects created method for the code to be tested. (I have tested it and it is working perfectly.)

class Point {

   private int x, y;

   public void Point(int x, int y) {

       this.x = x;

       this.y = y;

   }

   public double distance (Point other) {

      double distance = Math.sqrt(Math.pow((other.x - this.x), 2) + Math.pow((other.y - this.y), 2));

      return distance;

   }

   

   public int quadrant() {

       if (this.x > 0 && this.y > 0) {

           return 1;

       } else if (this.x < 0 && this.y > 0) {

           return 2;

       } else if (this.x < 0 && this.y < 0) {

           return 3;

       } else if (this.x > 0 && this.y < 0) {

           return 4;

       } else {

           return 0;

       }

   }

}

class Name {

   String firstName, lastName;

   char middleInitial;

   

   public String getNormalOrder() {

       String fullName = firstName + " " + middleInitial + " " + lastName;

       return fullName;

   }

   

   public String getReverseOrder() {

       String fullName = lastName + ", " + firstName + " " + middleInitial;

       return fullName;

   }

}

You might be interested in
Question 1 of 40
Novay_Z [31]

Answer:

D. Federal Work-Study

Explanation:

8 0
3 years ago
In programming, what is a string?
Alla [95]

A way to store a sequence of letters, numbers or symbols.

This is the most accurate statement, though not entirely true.

Hope this helps.

7 0
3 years ago
Read 2 more answers
Select the true statement about the motherboard.
Nata [24]

Answer:

it executes the commands sent to it by the applica software .

8 0
2 years ago
While a remote assistance session is in progress, what keyboard key(s) can the requestor press to terminate the connection?
o-na [289]

ESC key can the requestor press to terminate the connection.

<h3>what is the ESC key?</h3>
  • The European Society of Cardiology is a professional organization that strives to increase scientific knowledge of the heart and vascular system as well as the prevention, diagnosis, and treatment of disorders of the heart and blood vessels.

To learn more about ESC key, refer

to brainly.com/question/25689052

#SPJ4

8 0
2 years ago
You want to use a terminal emulation program to terminal into a series of Cisco routers. You will be managing these devices remo
vampirchik [111]
If a terminal emulation program is used and the devices should be reotely managed, then you should use the Telnet protocol. <span>Telnet is a simple, text-based network protocol that is used for accessing remote computers over TCP/IP networks like the Internet. </span>It allows the user access<span> to a text terminal and all its </span>applications<span> such as command-line for example. </span>

7 0
3 years ago
Other questions:
  • Create a file account.cpp containing a Bank Account Class.
    11·1 answer
  • What important feature of an email gives you a clue about what the sender wants to tell you?
    12·2 answers
  • I have to write this in Java, but i've never even learned it before and i'm completely lost
    12·1 answer
  • Pleeeese help me for these questions
    8·1 answer
  • Give me at least five main characteristic of irrigation equipment​
    8·1 answer
  • Define online pollution
    5·1 answer
  • You were recently hired by a small start-up company. The company is in a small office and has several remote employees. You have
    15·1 answer
  • How do you enter the decimal 73 into the computer?
    11·1 answer
  • Write a program code which asks for 80 numbers between 100 and 1000 to be entered.
    7·1 answer
  • The internet is ________. an internal communication system for businesses a large network of networks a communication system for
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!