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
To simplify the conceptual design, most higher-order relationships are decomposed into appropriate equivalent _____ relationship
LenaWriter [7]

Answer: binary

Explanation:

Conceptual design refers to the early phase of the design process, whereby the outlines of function are articulated. The conceptual design consist of the design of processes, interactions, and strategies. It is the first stage in the database design process.

The output of the conceptual design process describes the main data entities, and constraints of a particular problem domain. To simplify the conceptual design, most higher-order relationships are decomposed into appropriate equivalent binary relationships whenever possible.

5 0
3 years ago
You have a notebook computer and wish to connect to an IEEE 802.11n wireless network. The computer does not have a built-in wire
Ira Lisetskai [31]

Answer:

The wireless adapter to use is the Wireless USB 2.0 Extender

Explanation:

The Wireless USB 2.0 Extender is a USB component that enables a computer to connect to and communicate with other computers on a network, or even to connect to the internet.

It uses an IEEE 802.11g radio platform and communicates within a radio frequency range of 2.4GHz.

Therefore, in cases where a notebook computer does not have a built-in wireless LAN card or PC card interface, you can use the Wireless USB 2.0 Extender as the best solution to that problem.

3 0
3 years ago
The marketing company era marks the time when companies realized they needed to switch from just trying to sell
djverab [1.8K]

Answer:

False

Explanation:

I hope this is right

7 0
2 years ago
1 byte =???? bit<br> please help me
diamong [38]

Answer:

8 bits make a byte

Explanation:

8 bits make a byte

7 0
2 years ago
Write a program that lets the user enter four quarterly sales figures for six divisions of a company. The figures should be stor
NeTakaya

Answer: Buisness calendars

Explanation:

7 0
2 years ago
Other questions:
  • A customer states that when she removes the printed pages from her laser printer output tray, the black ink smears all over her
    10·1 answer
  • a computer that no longer works after having minor repair work done to it may have been damaged by ______.
    6·1 answer
  • Which of the following would be considered a strong password?
    5·2 answers
  • A layer of control in each communicating device that provides functions such as flow control, error detection, and error control
    13·1 answer
  • What standard linux utility is used to install and configure software on centos operating systems?
    8·1 answer
  • Help me on this question
    14·1 answer
  • The Fibonacci numbers are the numbers
    15·1 answer
  • A type of graph that uses horizontal bars to compare data is called a
    15·2 answers
  • Which of the following accessories would you use to create a drawing? A. Calculator B. Notepad C. Paint D. WordPad
    14·2 answers
  • Which component of a word processor displays the name of the document?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!