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
Zepler [3.9K]
2 years ago
12

Write a method that prints on the screen a message stating whether 2 circles touch each other, do not touch each other or inters

ect. The method accepts the coordinates of the center of the first circle and its radius, and the coordinates of the center of the second circle and its radius.
The header of the method is as follows:

public static void checkIntersection(double x1, double y1, double r1, double x2, double y2, double r2)


Hint:

Distance between centers C1 and C2 is calculated as follows:
d = Math.sqrt((x1 - x2)2 + (y1 - y2)2).

There are three conditions that arise:

1. If d == r1 + r2
Circles touch each other.
2. If d > r1 + r2
Circles do not touch each other.
3. If d < r1 + r2
Circles intersect.
​
Computers and Technology
1 answer:
beks73 [17]2 years ago
6 0

Answer:

The method is as follows:

public static void checkIntersection(double x1, double y1, double r1, double x2, double y2, double r2){

    double d = Math.sqrt(Math.pow((x1 - x2),2) + Math.pow((y1 - y2),2));

    if(d == r1 + r2){

        System.out.print("The circles touch each other");     }

    else if(d > r1 + r2){

        System.out.print("The circles do not touch each other");     }

    else{

        System.out.print("The circles intersect");     }

}

Explanation:

This defines the method

public static void checkIntersection(double x1, double y1, double r1, double x2, double y2, double r2){

This calculate the distance

    double d = Math.sqrt(Math.pow((x1 - x2),2) + Math.pow((y1 - y2),2));

If the distance equals the sum of both radii, then the circles touch one another

<em>     if(d == r1 + r2){</em>

<em>         System.out.print("The circles touch each other");     }</em>

If the distance is greater than the sum of both radii, then the circles do not touch one another

<em>    else if(d > r1 + r2){</em>

<em>         System.out.print("The circles do not touch each other");     }</em>

If the distance is less than the sum of both radii, then the circles intersect

<em>    else{</em>

<em>         System.out.print("The circles intersect");     }</em>

}

You might be interested in
(in c++):
Ganezh [65]

The program is an illustration of string manipulations

<h3>What are string manipulations?</h3>

String manipulations include calculating the lengths of strings and also performing several operations on the string

<h3>The actual program</h3>

The complete program in C++ is as follows:

#include <iostream>

using namespace std;

int main(){

   string passwordStr;

   cin>>passwordStr;

   if(passwordStr.length() <= 7){

       cout<<"Valid";

   }

   else{

       cout<<"Invalid";

   }

  return 0;

}

Read more string manipulation at:

brainly.com/question/14284563

6 0
2 years ago
Which are guidlines for using themes? Check all that apply
Andreyy89

Answer: A. Using different cell styles can help you differentiate different types of data.

B. Fonts should be easily readable and of appropriate size.

D. Be consistent with themes across worksheets and workbooks.

Explanation:

A theme refers to the preset package that contains functionality details and graphical appearance.

The guidelines for using themes include:

• Using different cell styles can help you differentiate different types of data.

• Fonts should be easily readable and of appropriate size.

• Be consistent with themes across worksheets and workbooks.

Therefore, the correct options are A, B and D.

7 0
3 years ago
Processing information involves ____.a. Performing arithmetic or logical operations on binary data accepting information from th
Iteru [2.4K]

Answer:

c. Both a and b

Explanation:

In computing, processing information simply means performing a task. It means transforming data from one form to another.

In the real sense of it, it means, performing arithmetic or logical operations (by ALU) on binary data which could result in transmitting data from input devices to output devices. When a user launches the calculator application on his PC, and he tries to do some arithmetic (which is processed by the ALU) by entering numbers using his keyboard/mouse (input devices), he gets the result on the screen(output device). This scenario is a typical example of processing information.

<em>Hope this helps!</em>

7 0
3 years ago
How can this be achieved? Universal Containers stores invoices in SAP. Users want to view invoice data onthe related Account rec
Nookie1986 [14]

Answer:

Option B  and  Option D

are correct answers.

Explanation:

To view the invoice data on the related account records in sales force when invoices are stored in SAP we must:

  • Create an External Object connected to an invoice table in SAP

           OR

  • Connect to an O-Data Publisher Service for SAP databases.

SAP can be defined as Systems, Applications and Products. SAP is basically a software which has a backbone of SAP ERP (most advance Enterprise Resource Planing). SAP software helps to manage many business areas by providing powerful tools that include financial and logistic areas.

<h2 /><h2>I hope it will help you!</h2>
6 0
3 years ago
Why must programs written in a high-level language be translated into machine language?
eimsori [14]
The only thing that a computer actually understands is machine language. English-like constructs are gibberish to a computer, so they need to be translated by a compiler to machine language to run natively.
4 0
3 years ago
Other questions:
  • Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In one to two sentences,
    9·2 answers
  • To add text to a slide when using presentation software, you need to add a text box. To add a text box, click the Text Box butto
    6·2 answers
  • A(n) _____ bus enables the central processing unit (CPU) to communicate with a system’s primary storage.
    5·1 answer
  • What social impact did the gunpowder have on society?
    12·1 answer
  • 0x400C (in hexadecimal)?
    8·1 answer
  • What is the difference between a method and a function? In what ways are they similar? Why do you think Python makes a distincti
    15·1 answer
  • Add me on fornite buddies Lynn_.25
    13·2 answers
  • When computer network are joined together they form a bigger network called the​
    5·1 answer
  • Which term refers to the use of the internet at work for personal use?.
    12·1 answer
  • The new software analyzes sales conversion per sales in a way intended to increase sales success. what is the first thing you mu
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!