Java Program to Find Angle Subtended by the Chord to Center of the Circle If the Angle Subtended by Another Equal Chord of a Congruent Circle is Given

In the previous article, we have discussed about Java Program to Find Area of Inner Circle Which Passes Through Center of Outer Circle and Touches its Circumference

In this article we are going to see how to find angle subtended by the chord to center of the circle if the angle subtended by another equal chord of a congruent circle is given by using Java programming language.

Java Program to Find Angle Subtended by the Chord to Center of the Circle If the Angle Subtended by Another Equal Chord of a Congruent Circle is Given

Before Jumping into the program directly let’s see how to find angle subtended by the chord to center of the circle when the angle subtended by another equal chord of a congruent circle is given.

Suppose there are 2 congruent circles C1, C2 having 2 equal chords AB, XY, with centers O, Z

The angle subtended to the center from the chord of one of the circles is given.

Now, the angle subtended by the chord to the center of another circle will be calculated by.

Since both the circles are congruent so the radius and chords will be same

AO = XZ

BO = YZ

AB = XY

So, triangle AOB is congruent to triangle XZY

Hence angle AOB = angle XZY

Example:

AOB = 90.3
XZY = 90.3

Let’s see different ways to find angle subtended by the chord to center of the circle if the angle subtended by another equal chord of a congruent circle is given.

Method-1: Java Program to Find Angle Subtended by the Chord to Center of the Circle If the Angle Subtended by Another Equal Chord of a Congruent Circle is Given By Using Static Input Value

Approach:

  • Declare an double variable say ‘AOB’ and assign the value to it, which holds the angle value made at the center of circle C1.
  • Find the angle XZY of circle C2 by passing the same angle value of AOB
  • Print the result.

Program:

import java.io.*;
class Main
{
    public static void main(String [] args)
    {
        double AOB = 90.8;
        // formula to find angle made at the center of congruent circle C2
        double XZY = AOB;     
        System.out.println("The angle made at the center of the circle C2 is " + XZY);
    }
}
Output:

The angle made at the center of the circle C2 is 90.8

Method-2: Java Program to Find Angle Subtended by the Chord to Center of the Circle If the Angle Subtended by Another Equal Chord of a Congruent Circle is Given By Using User Input Value

Approach:

  • Declare an double variable say ‘AOB’ which holds the angle value made at the center of circle C1.
  • Then we will take the value of “AOB” as user input using scanner class.
  • Find the angle XZY of circle C2 by passing the same angle value of AOB
  • Print the result.

Program:

import java.io.*;
import java.util.Scanner;
class Main
{
    public static void main(String [] args)
    {
        // scanner class obj ref
        Scanner s = new Scanner(System.in);                              
        System.out.println("Enter the angle made at the center of the circle C1");
        // to take user input value
        double AOB = s.nextDouble();                                    
        // formula to find angle made at the center of congruent circle C2
        double XZY = AOB;     
        System.out.println("The angle made at the center of the circle C2 is " + XZY);

    }
}
Output:

Enter the angle made at the center of the circle C1
120.6
The angle made at the center of the circle C2 is 120.6

If you are new to Java and want to learn the java coding skills too fast. Try practicing the core java programs with the help of the Java basic programs list available.

Related Java Programs: