Question: Write a method called anglePairs that accepts three angles (integers), measured in degrees, as parameters and returns whether or not there exist both complementary and

Write a method called anglePairs that accepts three angles (integers), measured in degrees, as parameters and returns whether or not there exist both complementary and supplementary angles among the three angles passed. Two angles are complementary if their sum is exactly 90 degrees; two angles are supplementary if their sum is exactly 180 degrees. Therefore, the method should return true if any two of the three angles add up to 90 degrees and also any two of the three angles add up to 180 degrees. For example, the call anglePairs(120, 60, 30) returns true. Assume that each angle passed is nonnegative.

Step by Step Solution

3.34 Rating (175 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

nested ifs with solution public static boolean anglePairs int al int a2 i... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Building Java Programs A Back to Basics Approach Questions!