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]
3 years ago
12

1. Add the following method to the Point class:

Computers and Technology
1 answer:
Pachacha [2.7K]3 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
Imagine the world in 2030 and write a letter to your future self. Be sure to mention things that you think your future self woul
Nuetrik [128]
I’m making this easy & basic so if you need to use it, feel free!



Dear Future me, It feels a little strange to be writing a letter to my future self, but it’s also rather exciting! At present I am very interested in sports and am sure this is a hobby that has proved beneficial because I can hit a home run.
So tell me have things changed a lot? Do we still have a lot of restaurants? Has Artificial Intelligence proved to be taking over the world? You must be so used to social distancing while we struggle to figure out a cure.

Is our pet fish doing well or have you replaced it with robot? Ha! Ha! It’s so much easier, right?! How is your preparation for the new job? Must be really nice to be an adult! Have you changed our hair? Maybe our style? Am sure things have turned out well for you in 2030. Great talking to you! Stay safe.It’s been nice writing to you Hope this letter brings back old memories…

Sincerely, past you.
7 0
3 years ago
What do you think about the argument that word processing reduces the quality of writing?
slava [35]
<span>I believe when you're given a sufficient amount of time you are able to write your thoughts clearly than when you're given a short period of time to answer questions or make an argument on an essay BUT there is a drawback with the tools within the word processing. Word processing comes with a spell check but it does not correct homonyms such as they're, their and there or other homonyms. My experience with word processing is that I always need time to effectively write something and that helps me make less grammatical mistakes when I take my time to write and edit my paper, I guess it all depends on the individual in their writing skills

I hope this helps!
</span>
5 0
4 years ago
Think about the last business that you purchased a product or a service from. What three types of software might they need? Why
Anton [14]

Answer:

a web a networking site and their online purchasing

Explanation:

web for their business networking site for their employees

5 0
4 years ago
Read 2 more answers
i replaced my thermal paste with ketchup and now my pc is getting hot i tried putting my cat in the microwave but it didn't work
ankoles [38]

use your cat's urine instead of ketchup

3 0
3 years ago
Read 2 more answers
Hello my friends i am trying to reboot my i phone 4 but i could not i tried many ways can u help me
g100num [7]

Answer:

Launch iCloud.com in the web browser on your PC.

After the page opens, enter the credentials; username and password.

On the screen, after you login, you’ll see all iDevices you’ve associated...

Choose "Erase operation" for devices you can’t log inside.

or

Connect your iPhone to a computer. If your iPhone gets hung up on the Apple logo or a solid-color screen when forcing it to restart, you can try using your PC or Mac to repair it without losing data. Start by connecting the iPhone to the computer using its charging cable.

2

Open Finder (Mac) or iTunes (PC). If you're using Mac Catalina or later, click the two-toned face on the Dock to launch Finder. If you have Windows or an earlier version of macOS, open iTunes from the Start menu or Applications folder. Locate your iPhone. If you're using Finder, click your iPhone's name in the left panel under "Locations." If you're using iTunes, click the button with an iPhone icon near the top-left corner of the app (to the right of the drop-down menu)

Explanation:

8 0
3 years ago
Other questions:
  • Photo editing can transform any image into a great photograph.
    9·1 answer
  • Nascar has inserted an image into his document but needs the image to appear on its own line Which option should he choose?
    12·2 answers
  • In an e-credit card transaction the clearinghouse plays the following role:
    6·2 answers
  • How to do this PLEASE HELP 80 points!
    15·1 answer
  • Why does this app say im following a question? how do i make it stop?​
    14·2 answers
  • Which of the following statements about software licensing are true? Select 3 options.
    5·1 answer
  • Which key(s) will launch the Spelling Checker dialog box? F8 F7 Ctrl+H F2
    11·2 answers
  • Can we update App Store in any apple device. (because my device is kinda old and if want to download the recent apps it aint sho
    10·1 answer
  • Which tools do meteorologists use to collect data about the weather?
    13·2 answers
  • ______-____ parameters provide a one-way link between actual parameters and formal parameters.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!