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
At some point in your driving career, you will most likely be faced with an oncoming vehicle swerving into your travel lane. tru
aleksley [76]

I believe the answer is True.

7 0
3 years ago
Match each vocabulary word to its definition.
viktelen [127]

Answer:

can you show the picture??

5 0
3 years ago
For each of the following data storage needs, describe which abstract data types you would suggest using. Natural choices would
timofeeve [1]

Answer:

Explanation:

1. data type which allows quick retrieval of the name of a song given the name of a playlist(or album) and the track number would be :

map

It can be defined as a key-value pair where combination of playlist-track number would be the the key and song name/details would be the value for that corresponding key

2. data type to store the text of the steps of a recipe for how to bake a cake would be :

list

list of string datatype can be used : each item in the list will have recipe in the data part of the node

3. data type for storing file extension with the possible programs that are able to read/open that kind of file wold be

set

It can be defined as a key-value pair where file extension would be the the key and possible program list would be the value for that corresponding key

4. data type that stores all the TV station identifications (e.g. KABC, KNBC, etc..) would be :

map

as there is no duplication in the names of TV station so map with key/value pair of TV station name /details would be appropriate to be used

8 0
2 years ago
Which of the following can help a search engine understand what your page is about?
ANEK [815]

Answer:

The title tag  is the correct answer.

Explanation:

In the following question there is some detail that is the options are missing:

  • The number of images used
  • The title tag
  • The date it was published
  • The total number of words

The title tag of the pages or the websites helps the search engines to know what types of details contained in your pages or the website. The title of the page of the website can help the users and the search engines is what type of information or data on your page. So, that's why the following option is true.

6 0
3 years ago
How did a hacker get my phone number? I commented on his lnstagrm and then he called me. Please help someone.
barxatty [35]

Although blocking them might help, check to see if you have your phone number public if you do remove it, you may want to get your phone number changed.

Hope I could help you!

Ben :)

3 0
3 years ago
Other questions:
  • 4. Who developed the first design technology program which had a
    12·1 answer
  • Which term is used to describe a password-protected, encrypted data file that verifies the identity of the sender of a message?
    8·1 answer
  • What are some of the academic benefits of a later start time that Jordan mentions​
    12·1 answer
  • True/False - According to CP-14 Sale of Modular Homes, a licensee who sells land and a modular home to be affixed to the land, t
    11·1 answer
  • Please help!!!
    9·2 answers
  • Which term describes a visual object such as a picture a table or text box
    15·2 answers
  • Hey! PLEASE HELP!!!
    12·1 answer
  • PLEASE HELP ME ASAP!!! Looking at the misty rain and fog (pictured above) Explain at least two defensive driving techniques you
    15·1 answer
  • When creating any digital work, what is the MOST important thing to remember?
    7·1 answer
  • In which of the following phases of filmmaking would a production team be focused on the process of casting?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!