In the previous article, we have discussed about Java Program to Find the Side of the Squares Which are Inclined Diagonally and Lined in a Row
In this article we are going to see how to find angle subtended by the chord when the angle subtended by another chord of same length is given by using Java programming language.
Java Program to Find Angle Subtended by the Chord when the Angle Subtended by another Chord of Same Length is Given
Explanation:
Suppose there is a circle with center O
and having two chords of equal length PQ
and RS
The angle subtended by one of the chord (say PQ) to the center is given = x
Now, We need to find the measure of the angle subtended by another chord at the center.
Now, in triangle POQ
and ROS
,
PO = OR
(As both are radius of same circle)
OQ = OS
(As both are radius of same circle)
PQ = RS
( As given both chords are of equal length)
So, the triangles POQ
and ROS
are congruent to each other.
So, angle POQ = angle ROS
Example:
If angle AOC = 48.24 Then angle BOD = 48.24
Let’s see different ways to find angle subtended by the chord when the angle subtended by another chord of same length is given.
Method-1: Java Program to Find Angle Subtended by the Chord when the Angle Subtended by another Chord of Same Length is Given By Using Static Input Value
Approach:
- Declare a double variable say ‘AOC’ and assign the value to it, which holds the angle subtended by chord AC at center O.
- Find the angle subtended by chord BD at center O i.e. BOD which is same as the angle AOC (because of congruence)
- Print the result.
Program:
import java.io.*; class Main { public static void main(String [] args) { double AOC = 48.24; // formula to find angle subtended by chord BD at center O double BOD = AOC; System.out.println("The subtended angle by the chord BD at center O is " + BOD); } }
Output: The subtended angle by the chord BD at center O is 48.24
Method-2: Java Program to Find Angle Subtended by the Chord when the Angle Subtended by another Chord of Same Length is Given By Using User Input Value
Approach:
- Declare a double variable say ‘AOC’ and assign the value to it, which holds the angle subtended by chord AC at center O.
- Then we will take the value of “AOC” as user input using scanner class.
- Find the angle subtended by chord BD at center O I.e BOD which is same as the angle AOC (because of congruence)
- Print the result.
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 subtended by chord AC"); // to take user input value double AOC = s.nextDouble(); // formula to find angle subtended by chord BD at center O double BOD = AOC; System.out.println("The subtended angle by the chord BD at center O is " + BOD); } }
Output: Enter the angle subtended by chord AC 12.69 The subtended angle by the chord BD at center O is 12.69
Grab the opportunity to learn all effective java programming language concepts from basic to advance levels by practicing these Java Program Examples with Output
Related Java Programs:
- Java Program to Find Angle on Circumference Subtended by the Chord When the Central Angle Subtended by the Chord is Given
- Java Program to Find Area of Inner Circle Which Passes Through Center of Outer Circle and Touches its Circumference
- 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
- Java Program to Find Nth Angle of a Polygon Whose Initial Angle and per Angle Increment is Given