Assume that isIsosceles is a boolean variable , and that the variables isoCount,triangleCount, and polygonCount have all been declared and initialized.

LANGUAGE: JAVA

CHALLENGE:
Assume that isIsosceles is a boolean variable , and that the variables isoCount,triangleCount, and polygonCount have all been declared and initialized. Write a statement that adds 1 to each of these count variables (isoCount,triangleCount, andpolygonCount) if isIsosceles is true.

SOLUTION:

LANGUAGE: JAVA

CHALLENGE:
Assume that isIsosceles is a boolean variable , and that the variables isoCount,triangleCount, and polygonCount have all been declared and initialized. Write a statement that adds 1 to each of these count variables (isoCount,triangleCount, andpolygonCount) if isIsosceles is true.

SOLUTION:

if ( isIsosceles == true )
{
    isoCount += 1;
    triangleCount += 1;
    polygonCount += 1;
}