Write a method called isIsoceles that accepts three integer parameters that represent the lengths of the sides of a triangle. The method returns true if the triangle is isosceles but not equilateral (meaning that exactly two of the sides have an equal length), and false otherwise.

What will be an ideal response?


```
public boolean isIsoceles(int side1, int side2, int side3)
{
boolean result = false;

if ( (side1 == side2) && side1 != side3) ||
(side2 == side3) && side2 != side1) ||
(side1 == side3) && side1 != side2) )
result = true;

return result;
}
```

Computer Science & Information Technology

You might also like to view...

Assuming that string1 = "hello" and string2 = "hello world", which of the following returns 0?

a. strcmp(string1, string2);. b. strcmp(string1, string2, 6);. c. Strncmp(string1, string2, 5);. d. strncmp(string1, string2, 6);.

Computer Science & Information Technology

There has been great controversy over blasphemous speech in recent years and it is of great prominence because of the violence that sometimes results.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

____ refers to enhancing the appearance of the information.

A. Laying out B. Coloring C. Formatting D. Reshaping

Computer Science & Information Technology

Which of the following items are commonly found on the Windows 10 taskbar? (Choose all that apply.)

Start button File menu Clock open applications

Computer Science & Information Technology